Problems loading model; Pytorch
I am trying to load a model I saved with the following and it gives me this error:
import torch

model = torch.load('./grunet.pkl')
model.eval()

This is the error:
  Traceback (most recent call last):
  File &quot;.\eval.py&quot;, line 4, in &lt;module&gt;
    model.eval()
  AttributeError: 'NoneType' object has no attribute 'eval'

Please help!

You are missing one step:
model = YourModelClass()
model.load_state_dict(torch.load(&quot;./grunet.pkl&quot;))
model.eval()

# do something with the model

