I know

  
    
    
    Giving multiple parameters in optimizer 
  
  
    How can i give multiple parameters to the optimizer? 
fc1 = nn.Linear(784, 500)
fc2 = nn.Linear(500, 10)
optimizer = torch.optim.SGD([fc1.parameters(), fc2.parameters()], lr=0.01)  # This causes an error.

In this case, for simplicity, i don’t want to use a class with nn.Module.