Solved by Dwight_Foster in post #3 
              
              
                So the problem looks to be in the way you defined your model. In pytorch when using a model and the nn library you need to define the model before you can execute the forward pass in it. Currently you do  not define your model before you are trying to use it so it is still expecting the number of cl…