I got following error: NameError: name ‘L’ is not defined when I try to run the training process. I have used the same code mentioned on that page. Everything worked fine except for the final training step.
Here is the picture of my code I got an error in line number 20: loss = loss = [L(yhat, y) for yhat, y in zip(outputs, label)]. I couldn’t figure out, what does L do in this code.
I used loss_fn instead of L now I am getting following error:
MXNetError: [17:29:26] src/storage/./pooled_storage_manager.h:151: cudaMalloc failed: out of memory
My system has a core i9 processor, 64 GB RAM, and Nvidia 12GB GPU. Still, I am getting "cudaMalloc failed: out of memory"
Is there any way to train my model using the imageNet dataset with my PC
Could you try reduce the batch size? And it will take quite a while (definitely not sit there and wait) with the ImageNet dataset on your PC for 120 epochs as mentioned in the tutorial. I would not encourage to do that especially you only have one GPU.
I want to run only 2 epochs for testing. If it is worked for 2 epochs then I will use AWS to run the training. My current batch size is 8 and it removes memory-related issues. However, now I am getting following errors from line number 30: NameError: name ‘opt’ is not defined
What does opt stand for? Is it optimizer or something else?
I don’t think you really need the ‘opt.’ there. It must be a copy paste error for a file which has not really QA verified. The opt stands for option, I believe.
I removed opt from my code. Now it is working. Thanks a lot @TristonC
Is there any way I can contribute my current code to this page? So anyone using this page can get help.