I'm a super beginner. I checked the official site Transfer learning with a pretrained ConvNet. I'd like to make predictions by the site's trained model. The following code is wrong? And I'd like to know that “image” and “class name”. Hm.. How should I do?... Please give me some advice…
predictions = model.predict(test_batches)[1]
print(predictions)
#[-0.11642772]
First of all Tensorflow is horrible. Incredibly error-prone and difficult to install and use. I would recommend using Pytorch tutorials instead. Second, the link you posted has a Colab button. Did you try clicking that button? Colab makes installation easier because it’s online and not on your computer.
Also transfer learning is NOT a beginner topic. Maybe try an easier notebook, if that works for you: https://github.com/sgrvinod/Deep-Tutorials-for-PyTorch/blob/master/README.md
Related
I'm learning Pytorch so I decided to participate in kaggle competition DigitRecognition. It seems to me that eveything is correct but during the training the model accuracy was get worse and worst. I think that I've made some unnoticable mistake which spoils the model maybe connected with custom DataSet class (MyDataset) but I can't find it myself. Please, somebody help me.
Here is colab notebook with all solution.
I trained a model using matterport maskrcnn. I already had .h5 model file but i am not able to convert it to .mlmodel. As there are many custom layers involved. I already tried whatever I am able to find on google regarding the same. I also tried https://github.com/edouardlp/Mask-RCNN-CoreML for conversion. So far no success.
Does anybody able to did the conversion so far successfully, if yes can you share the codebase or tutorial for the same.
I am able to convert using the same github repo mentioned in the question. But you can't debug the code in Xcode as maskrcnn is to memory heavy. Its better to use another architecture like deeplab.
Here's a github project https://github.com/edouardlp/Mask-RCNN-CoreML/releases/tag/0.2 with a MaskRCNN.ml model.
Note: You have to copy the models into the project to get it to compile.
I'm kinda new to the whole machine learning/deep learning field and I have a few doubts.
I was doing this tutorial on the tensorflow page, https://www.tensorflow.org/tutorials/images/classification, and everything went according to normal, but the tutorial ends at the validation loss/accuracy.
I was wondering on how I could upload a photo of my dog and put it in the model to test it, but I couldn't find an answer to that.
I tried using a few images of the training dataset to try to predict them, but the classes it predicts, along with the numbers predicted are weird, as shown here: https://imgur.com/a/45jubOh. My results are really similar to the tutorial's.
Can someone help me with that? Uploading the image and testing it and interpreting the classes along with the predicted numbers.
Thanks a lot!
I've searched for working mechanism of tensorflow object detection in google. I've searched how tensorflow train models with dataset. It give me suggestion about how to implement rather than how it works.
Can anyone explain how dataset are trained in fit into models?
You can't "simply" understand how Tensorflow works without a good background on Artificial Intelligence and Machine Learning.
I suggest you start working on those topics. Tensorflow will get much easier to understand and to handle after that.
How can I load a .pb protobuf model and then tweak the network as needed (specially the outer layers) in order to train a new model for completely different classes? Effectively doing transfer learning?
I want to do something like these (i.e. train the outer layers with a bigger learning rate than the inner layers) among other things, so I need a way to not only load the graph with the variables, but to alter the network's structure and hyperparameters too.
If anyone has an example to follow with the inception model, it would be amazing!
My question is very similar to this one.
I've searched all over the internet (TF docs, Github, StackOverflow, Google...) but I can't seam to find something useful for a novice.
Thanks a lot!
This is the updated tutorial from official Tensorflow website https://www.tensorflow.org/hub/tutorials/image_retraining
They use the pre trained Inception V3 model and everything works fine. You can change the dataset folder to your own dataset
tf.import_graph_def() is the function for loading a GraphDef:
https://www.tensorflow.org/versions/0.6.0/api_docs/python/framework.html#import_graph_def
Hopefully once imported, you can make the modifications to the graph you need. It would be easier, though, to modify the Python code that generated the graph in the first place, if you have access to that.