-1

I just loaded the pre-trained model 3D resnet https://github.com/kenshohara/3D-ResNets-PyTorch

I loaded this model in this way after i download from the link above the file 'resnext-101-kinetics.pth' : way i defined the model

this model work on a big dataset of videos (unfortunately i don't have enough space on my pc and i didn't find a link that i can download part of the data set). I just want to know if i load the model correctly and to know that this net is trained. There is an option to be sure that the model loaded well? I printed the state_dict and it prints the weights.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Daniel Afrimi
  • 35
  • 1
  • 7

1 Answers1

0

It already includes the script to load the pretrained weights to the model. Please check the code from the line 168 - line 173:

https://github.com/kenshohara/3D-ResNets-PyTorch/blob/master/model.py#L168-L173

Change the value for default in the opts.py file, to the path of the file you downloaded resnext-101-kinetics.pth.

'--pretrain_path', default='path/to/resnext-101-kinetics.pth', type=str, help='Pretrained model (.pth)')

If there is no error appears when you run your code, then the pretrained file resnext-101-kinetics.pth is loaded properly.

David Ng
  • 1,618
  • 10
  • 11
  • Thanks! my code fail in the assert on line 171 (assert opt.arch == pretrain['arch']). i checked this problem and i saw this : https://github.com/kenshohara/3D-ResNets-PyTorch/issues/50 but they speak there on the resnet-34. so i have no idea how to fix this problem because the path that i gave is good ( resnext-101-kinetics.pth). thank you so much! – Daniel Afrimi Apr 23 '19 at 20:34