Hi Everyone, For some reason, I am not able to post this in the thread which relates to Lesson1. When I tried editing the post, I could not see anyway to change its category to the right one.
My first question is regarding the video for lesson1. Towards the end of the video, @jeremy says that the model uses gradient descent and backpropagation, and he also says that we talked about these earlier. Is he referring to some other video in which these were discussed?
Here I am trying to play with lesson1âs notebook:
Changed the path to use the entire data set, not just the sample.
Created a subdirectory in the test1 directory.
After the training, used the test images to test the prediction.
The labels âtenchâ and âgoldfishâ show up because weâre borrowing a model that was defined for a different task. What matters are the labels 0 and 1 which will either mean cat and dog or dog and cat, I donât remember the order.
âtenchâ means either dog or cat (I donât remember which) and âgoldfishâ means cat or dog (I donât remember which). Theyâre just names, strings of symbols. You can change the label names by running vgg.classes = ["dog", "cat"] or vgg.classes = ["cat", "dog"] (depending on which order is true).
In the original task that the model was used for, it had to classify images as a tench, a goldfish, and many other things. It just so happened that tench was the first class and goldfish was the second class. Now that weâve repurposed the model and are using it to classify cats and dogs, the first class is cats (or maybe dogs) and the second class is dogs (or maybe cats), but the old class names carried over.
{
âfloatxâ: âfloat32â,
âepsilonâ: 1e-07,
âimage_dim_orderingâ: âthâ,
âbackendâ: âtheanoâ
}
I am still getting the error
/Applications/Anaconda/anaconda/lib/python2.7/site-packages/keras/layers/core.py:577: UserWarning: output_shape argument not specified for layer lambda_2 and cannot be automatically inferred with the Theano backend. Defaulting to output shape (None, 3, 224, 224) (same as input shape). If the expected output shape is different, specify it via the output_shape argument.
.format(self.name, input_shape))
I am on an iMac .
Hi @vahuja4,
I think the vgg16.py file that you are using is not the latest. In the old version of the file the cat, dogs classes are not updated for the predict method. It used imagenet classes. Check the latest version of vgg16.py (https://github.com/fastai/courses/blob/master/deeplearning1/nbs/vgg16.py). You can see that the finetune method updates the classes from imagenet to cats and dogs.