dear techies , I am a newbie to pytorch!
with open('esc50resnet.pth','wb') as f:
  torch.save(resnet_model, f)

and
import pickle
with open('indtocat.pkl','wb') as f:
  pickle.dump(train_data.i2c, f)

I have pickled my model to be retrieved later. But when I closed my notebook and reopened my program I used
import IPython
import pickle
with open('indtocat.pkl','rb') as f:
  indtocat = pickle.load(f)

I get the error
EOFError: Ran out of input
Please help me do I have retrain everytime from the beginning for my model to be executed ?
Is there any shortcut so that everytime I can use only my inferenced model after training?