pvse
pvse copied to clipboard
Not able to load pre-trained model, or the model I trained given your instruction
Hello, First of all thanks alot for sharing such a great work. I used your code to train the model on MSR_VTT dataset, and I did that successfully, thanks for clear code and instructions. Now, I have "model_best.pth.tar" file. I also downloaded your model mrw_pvse.pth from github repo. Running eval.py is giving an error on loading model from a given path.
Even tried to load your model "mrw_pvse.pth" but the same error
" RuntimeError: Error(s) in loading state_dict for PVSE: Missing key(s) in state_dict: "img_enc.cnn.conv1.weight", "img_enc.cnn.bn1.weight", "img_enc.cnn.bn1.bias", "img_enc.cnn.bn1.running_mean", "img_enc.cnn.bn1.running_var", "img_enc.cnn.layer1.0.conv1.weight", "img_enc.cnn.layer1.0.bn1.weight", "img_enc.cnn.layer1.0.bn1.bias", "img_enc.cnn.layer1.0.bn1.running_mean", "img_enc.cnn.layer1.0.bn1.running_var", "img_enc.cnn.layer1.0.conv2.weight", "img_enc.cnn.layer1.0.bn2.weight", "img_enc.cnn.layer1.0.bn2.bias", "img_enc.cnn.layer1.0.bn2.running_mean", "img_enc.cnn.layer1.0.bn2.running_var", "img_enc.cnn.layer1.0.conv3.weight", "img_enc.cnn.layer1.0.bn3.weight", "img_enc.cnn.layer1.0.bn3.bias", "img_enc.cnn.layer1.0.bn3.running_mean", "img_enc.cnn.layer1.0.bn3.running_var", "img_enc.cnn.layer1.0.downsample.0.weight", "img_enc.cnn.layer1.0.downsample.1.weight", "img_enc.cnn.layer1.0.downsample.1.bias", "img_enc.cnn.layer1.0.downsample.1.running_mean", "img_enc.cnn.layer1.0.downsample.1.running_var", "img_enc.cnn.layer1.1.conv1.weight", "img_enc.cnn.layer1.1.bn1.weight", "img_enc.cnn.layer1.1.bn1.bias", "img_enc.cnn.layer1.1.bn1.running_mean", "img_enc.cnn.layer1.1.bn1.running_var", "img_enc.cnn.layer1.1.conv2.weight", "img_enc.cnn.layer1.1.bn2.weight", "img_enc.cnn.layer1.1.bn2.bias", "img_enc.cnn.layer1.1.bn2.running_mean", "img_enc.cnn.layer1.1 .... so on"
Kindly guide me with this issue
Are you switching between single-gpu and multi-gpu environments by any chance?
Are you switching between single-gpu and multi-gpu environments by any chance?
Thanks for your answer, No I am not switching, I am only based on single GPU. I am trying to load your model given for mrw dataset
Are you switching between single-gpu and multi-gpu environments by any chance?
Thanks for your answer, No I am not switching, I am only based on single GPU. I am trying to load your model given for mrw dataset
Hello, I successfully loaded the pre-trained model given for mrw dataset using the following command in eval.py script
"checkpoint = torch.load(args.ckpt) model.load_state_dict(checkpoint, strict=False)"
is it right way to load your pre-trained model?
这样写就行: