Solved by nairbv in post #2 
              
              
                Think of a trivial model such as y=mx+b where x is the input, y the output, and m and b are the weights and biases. 
Ignoring PyTorch, you could implement a model as something like: 
class Model():
   def __init__(self, weight, bias):
       self.weight=weight
       self.bias=bias
    def forward(s…