Language: Python
Version: PyTorch 1-6-0
Suppose, a neural network is saved using torch.save(model, "model.pt")
.
Now, the model definition (source code) is placed somewhere else, so that it cannot find this definition when using torch.load("model.pt")
.
- Is it possible to load
model.pt
with a different model definition path? - Is it possible to extract the
state_dict
frommodel.pt
?