autonise/CRAFT-Remade

How to load pkl model with torch ?

anasali90 opened this issue · 1 comments

How to load pkl model with torch ?

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'])