Open GengZ opened 5 years ago
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)
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.
Thanks :)