Open Gambitier opened 6 years ago
I don't think you are supposed to extract the model file at all. I am not even sure it is a tar archive at all, yet that is how networks are saved in various examples. For example: imagenet (line 267), mnist (line 62).
Here is the documentation about saving/loading networks.
In my code, I can load the saved model to continue training as presented below, where checkpoint is the path to the tar file.
modelCheckpoint = torch.load(checkpoint)
model.load_state_dict(modelCheckpoint['state_dict'])
optimizer.load_state_dict(modelCheckpoint['optimizer'])
Had the same question thanks @zoogzog
hi, I am trying to extract m-25012018-123527.pth.tar, but while doing so error occurred. I have tried it on both windows and ubuntu.