537224 (2) [Avatar] Offline
#1
Many thanks for this book. I am actively reading it and I am thankful for absorbing all the wisdom in it. I am also trying out every R code in your book in my EC2 GPU instance to learn about deep learning/Keras.

However, I am a bit stuck in sections 5.3.2. and 5.3.3 where the VGG16 architecture is partly reused for the cats vs dogs classification task. While copy and pasting the code from 5.3.1 gives similar measures as depicted in Fig. 5.13, I have issues getting the anticipated performance in the sections 5.3.2 and 5.3.3. Using the frozen convultional part and training the 'end' with augmented training by copy/pasting the code from 5.3.2 my accuracies assymptote always at 85% for training and 90% for the validation data. Stabilization of those values occur after 10 epochs. Comparing it to figure 5.14. This is quite some difference. I tested it multiple times - still the same outcome. Same is true for the code from 5.3.3 where the parts of the convnet is also trained/fine tuned, here I am able to reproducibly achieve ~ 94% accuarcy (validation set). While this is IMHO still a great accuracy, it's not like I anticipated from looking at figure 5.16.

Can some report his or her findings/accuracy here to cross-check whether it has something to do with me?

Best wishes,
Carsten
256385 (38) [Avatar] Offline
#2
There was a bug fixed in a recent version of Keras which actually caused the accuracy to be less than what is shown in the text. The bug was actually causing the entire convolutional base to be retrained in the first pass, which inflated the results. The R Notebook that goes along with the chapter has been updated with the correct code and results:

https://jjallaire.github.io/deep-learning-with-r-notebooks/notebooks/5.2-using-convnets-with-small-datasets.nb.html

The final version of the book should be available in the next few days which will also include these corrections.
537224 (2) [Avatar] Offline
#3
Dear 256385,

Thanks for your ultra-fast and helpful reply. Good to see that I am still able to copy & paste smilie.

Many thanks for the link, I will try the code out.

Best wishes!
256385 (38) [Avatar] Offline
#4
This is actually the notebook you will want to use (the other link was for the one in the previous section):

https://jjallaire.github.io/deep-learning-with-r-notebooks/notebooks/5.3-using-a-pretrained-convnet.nb.html