ImageFolder return

My model works now but what are the numbers from loss supposed to mean? Secondly, is the tensor size 64, 19200 ok? Thank you everyone that has helped me in this thread, as a 9th grader, it means sooo much to me!

The loss value indicates how “wrong” (high loss value) or “right” (low loss value) the predictions of your model compared to the target are. CS231n - Loss function explains a couple of different loss functions and also explains their calculation.

If the model works for your use case, these values should be OK :slight_smile:

Ok. Thank you for everything so far. How do use the loss to a percentage or graph its accuracy using matplotlib…

Take a look at Tensorboard for monitoring. It is very useful.

1 Like

But isn’t it meant for tensorflow…

No. Well maybe originally.
But it even comes packaged with PyTorch: torch.utils.tensorboard — PyTorch 1.8.1 documentation

Don’t let the name scare you :slight_smile:

1 Like

Personally, the TensorBoard system is quite well developed, the docs for it on Torch are a little confusing in creating graphs to plot the accuracy of my model.
Namely, the two important parts are the fact that I have no clue in finding out the accuracy of my model and also have no clue in using tensorboard. I can sort of see how tensorboard works but would appreciate it if someone could kindly integrate a basic system into my code so that I can develop a better understanding… Thanks!

P.S. Thanks everyone that’s helped me (@m3tobom_M , @ptrblck ,@ptrmcl )

1 Like

I think there is an example in the tutorial @m3tobom_M sent that plots loss. This should be easily extendable to accuracy.