I am trying my hand at Lesson 1 substituting Men vs. Women in place of Dogs vs. Cats. I have run everything from lesson1.ipynb on a new file on my paperspace machine and seem to have a solid 80% accuracy rate using only 100 total images (60 Men && 60 Women Train, 20 Men && 20 Women Valid, 20 Men && 20 Women Test).
My question is what did I do wrong with the learning rate. In [49] : learn.sched.plot_lr() on my notebook shows a straight line. There is no slope like shown In [36] lesson1.ipynb. Further, my In [50]: learn.sched.plot() shows nothing. There is no plotted line (loss vs LR). This has me now questioning my supposed 80% accuracy. It doesnt make sense to me after watching Lesson 1 to have any accurate model if I cannot discern an accurate-ish learning rate.
I think this is due to the batch size (bs) as training on small size datasets. Not explicitely setting a bs for your data gets you to train your model on a default batch size of 64.
Try reducing the batch size like so: * data = ImageClassifierData.from_paths(path, tfms=transforms_from_model(arch, sz), bs=10)
and see what comes out.
Thank you so much for your help! That makes sense to shrink the batch size! It has also given me a curve on the learning rate scheduler. However, the validation loss x learning rate (log) is still empty?
Thank you for your time @StCarl. Unfortunately, I got the same thing. Something else I recall from Jeremy’s lesson was his lrf stopped at 75% as it had finished improving. Mine seems to go all the way to 100% Hmmm…
@StCarl thank you so much for the help. That did it! I started playing around with the batch size lowering it until I found a sweet spot that raised my accuracy to 88%.
data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, sz), bs=4)
Interesting idea! Do you mean add the extracted faces to the existing data set or replace the existing data with the extracted faces? Thanks for the heads up!