Solved by Diego in post #2 
              
              
                nn.Sequential can only be populated with pytorch modules (nn.Module) class, and F.relu is just a function, not a module. You should change the F.relu in your code to nn.ReLU(), dont forget the parethesis