gluoncv-torch
gluoncv-torch copied to clipboard
PyTorch Version For Saving & Loading Model
Thanks for the sharing the model. I ran into loading model error using PyTorch 0.3.1. I found the problem is because PyTorch model is backward compatible but not forward compatible.
- Just wonder which version you used for saving the model.
- And whether model compatible with slightly older version (0.3.1 in my case) will be available.
Thanks :)
removes the parameters with name consisting num_batches_tracked
should work for older pytorch version
tparams = net.state_dict()
for i, (k,v) in enumerate(tparams.items()):
if 'num_batches_tracked' in k:
tparams.pop(k)