Skip to content
Advertisement

ML model not loading full batch

I tried to build a machine learning model using CIFAR 10 dataset, but I am encountering a bug that my model stops training past i = 78 (looped 78 times, see code for more).

JavaScript

Sorry, I had to post the entire code because I cannot spot the mistake I made. Moreover, since I could not make it work, I tried copying the tutorial’s exact code, and it works as intended! I am posting that code too below,

JavaScript

Please help me find the bug!

Advertisement

Answer

Look at your main loop. you’ll notice you are using the test_loader instead of train_loader . This

JavaScript

should look like this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement