Lesson 1 image classification problem valid_loss values are nan in all epochs and learning rate decreasing i think instead of increasing when ploting it

i am really new here and just started out so i am not sure if i am missing something very obvious but i spent already couple of hours trying to figure that up so i thought i will ask :). i am not sure what is relevant to my question so i will tell for now everything that i did.

i am trying to do the image classification project of lesson 1 with google colab. i downloaded from google images with chrome extension images of black bears and teddy bears and under a folder name deep learning projects i did a train folder and valid folder and put 60 images of black bears in one folder and 60 images of teddy bears in another folder, in the valid folder i put 20 images of black bears in one folder and 20 images of teddy bears in another.

i synchronized google colab with google drive and it seemed to work and i could use data.show_batch to see the images but after using learn.fit_one_cycle(4) it seems like under training_loss i had values but under valid_loss i had #na# in all 4 epochs.

another thing that i noticed is that after using learn.recorder.plot() i got training_loss that dicrease as the learning rate grows instead of increasing like in the lecture in lesson 1 (tried to do a screenshot but not sure if it worked).

anyhow i will be glad for any help and thanks a lot in advance!! :).

This is normal. The loss values that you are seeing in the starting is due to the mini-batch training. With different batches the CNN is seeing completely new images and thus loss values increases. Also, the learning rate is increasing so a slight amplification of the above is possible.

NaN values in valid_loss may be due to problems with creating databunch.

thank you very much!! it seems i really had a problem in the databunch and i fix it and now it seems to work! :).

Hi, I have the same issue, but I have not been able to solve it. The first thing I did was increase the number and labeling quality of images. what did you do? Thank you.