People ask how to learn a new programming language. I often tell them that if they wish to learn a language similar to the one they know, it should not be too difficult to grasp the basic syntax and get up and running with it. But, to be actually productive with it, is a different story. To be productive, one needs to be familiar of the situations when things don’t go the way they had intended them to. Program not compiling, getting a weird runtime error, the error stack not displaying the line number correctly, the list is endless.
Programming over the years in various languages, I am of the opinion that how well someone knows a particular language is proportional to their ability to understand and deal with the tantrums the new member throws at them. This is true for frameworks as well. Hence, I decided to put together a series of posts about the errors I faced while learning PyTorch
myself. It would act as a reference for me and, hopefully, for others as well to understand and overcome difficulties when developing and training a model.
All working code snippets used in each post can be found here.
-
PyTorch Errors Series: ValueError: optimizer got an empty parameter list 07 Nov 2018
-
PyTorch Errors Series: RuntimeError: Expected object of type torch.DoubleTensor but found type torch.FloatTensor 21 Oct 2018
-
PyTorch Errors Series: AssertionError: nn criterions don't compute the gradient w.r.t. targets 20 Oct 2018