How to load pkl model with torch ?
anasali90 opened this issue · 1 comments
anasali90 commented
How to load pkl model with torch ?
mayank-git-hub commented
Sorry for the late reply! The model can be loaded using
model.load_state_dict(torch.load('path/to/model')['state_dict'])
The optimizer can be loaded by
model.load_state_dict(torch.load('path/to/model')['optimizer'])