Solved by spanev in post #2 
              
              
                Did you implement the forward method in your model class as: 
def forward(self, x):
    # method body

? 
The error means that model does not have a member function (method) overriding the nn.Module one.