title: How can I load a model in PyTorch without redefining the model?
body: <p>I am looking for a way to save a pytorch model, and load it without the model definition. By this I mean that I want to save my model including model definition.</p>
  
  <p>For example, I would like to have two scripts. The first would define, train, and save the model. The second would load and predict the model without including the model definition.</p>
  
  <p>The method using <code>torch.save(), torch.load()</code> requires me to include the model definition in the prediction script, but I want to find a way to load a model without redefining it in the script.</p>