how to extract the model hyperparameters from the save trained pytorch model(model.pth)
torch.load("model.pth")
.
What you extract depends on what its author save.
i have used torch.save(net.state_dict()). How can i get the hyperparameters used in this model. Like optimizers
torch.save(
dict(
model=your_state_dict,
optimizer=your_optimizer,
epoch=your_epoch,
other hyperparameters,
),
save_file
)
Thank you for the answer.