python3 – Pytorch – RuntimeError: error (s) when loading state_dict for ResNetModel: missing key (s) in state_dict:

I'm trying to run a pytorch program, which has already been tested by some people, so the program should be running well. In the run, I receive a strange error code for which I can not find an explanation online:

python3 run_forward.py
Traceback (last most recent call):
File "run_forward.py", line 22, in 
    model.load_state_dict (torch.load (PATH_TO_CKPT))
File "/home/anonymous/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 769, in load_state_dict
auto .__ class __.__ name__, " n  t" .join (error_msgs)))
RuntimeError: error (s) while loading state_dict for ResNetModel:
Missing key (s) in state_dict: "res_conv.conv1.weight", "res_conv.bn1.weight", "res_conv.bn1.bias", "res_conv.bn1.running_mean", "res_conv.bn1.running_var" , "res_conv" .layer1.0.conv1.weight "," res_conv.layer1.0.bn1.weight "," res_conv.layer1.0.bn1.bias "," res_conv.layer1.0.bn1.running_mean ", "res_conv.layer1 .0.bn1.running_var", "res_conv.layer1.0.conv2.weight", "res_conv.layer1.0.bn2.weight", "res_conv.layer1.0.bn2.bias", "res_conv .layer1.0 .bn2.running_mean "," res_conv.layer1.0.bn2.running_var "," res_conv.layer1.1.conv1.weight "," res_conv.layer1.1.bn1.weight "," res_conv.layer1 .1.bn1 .bias "," res_conv.layer1.1.bn1.running_mean "," res_conv.layer1.1.bn1.running_var "," res_conv.layer1.1.conv2.weight "," res_conv.layer1.1 .bn2.weight "," res_conv.layer1.1.bn2.bias "," res_conv.layer1.1.bn2.running_mean "," res_conv.layer1.1.bn2.running_var "," res_conv.layer2.0.conv1 .weight "," res_conv.layer2.0.bn1.weight "," res_conv.layer2.0.bn1.bias "," res_conv.layer2.0.bn1.runni ng_mean "," res_conv.layer2.0.bn1.run ning_var "," res_conv.layer2.0.conv2.weight "," res_conv.layer2.0.bn2.weight "," res_conv.layer2.0.bn2.bias "," res_conv.layer2.0.bn2.running_mean "," res_conv.layer2.0.bn2.running_var "," res_conv.layer2.0.downsample.0.weight "," res_conv.layer2.0.downsample.1 .weight "," res_conv.layer2.0.downsample. 1.bias "," res_conv.layer2.0.downsample.1.running_mean "," res_conv.layer2.0.downsample.1.running_var "," res_conv.layer2.1.conv1.weight "," res_conv.layer2. 1.bn1.weight "," res_conv.layer2.1.bn1.bias "," res_conv.layer2.1.bn1.running_mean "," res_conv.layer2.1.bn1.running_var "," res_conv.layer2.1. conv2.weight "," res_conv.layer2.1.bn2.weight "," res_conv.layer2.1.bn2.bias "," res_conv.layer2.1.bn2.running_mean "," res_conv.layer2.1.bn2. running_var "," res_conv.layer3.0.conv1.weight "," res_conv.layer3.0.bn1.weight "," res_conv.layer3.0.bn1.bias "," res_conv.layer3.0.bn1.running_mean " , "res_conv.layer3.0.bn1.running_var", "res_conv.layer3.0.conv2.weight", "res_conv.layer3.0.bn2.weight", "res_conv.layer3.0.bn2.bi like", "res_conv.layer3.0.bn2.running_mean", "res_conv.layer3.0.bn2.running_var", "res_conv.layer3.0.downsample.0.weight", "res_conv.layer3.0.downsample. 1.weight "," res_conv.layer3.0.downsample.1.bias "," res_conv.layer3.0.downsample.1.running_mean "," res_conv.layer3.0.downsample.1.running_var "," res_conv. layer3.1.conv1.weight "," res_conv.layer3.1.bn1.weight "," res_conv.layer3.1.bn1.bias "," res_conv.layer3.1.bn1.running_mean "," res_conv.layer3. 1.bn1.running_var "," res_conv.layer3.1.conv2.weight "," res_conv.layer3.1.bn2.weight "," res_conv.layer3.1.bn2.bias "," res_conv.layer3.1. bn2.running_mean "," res_conv.layer3.1.bn2.running_var "," res_conv.layer4.0.conv1.weight "," res_conv.layer4.0.bn1.weight "," res_conv.layer4.0.bn1. bias "," res_conv.layer4.0.bn1.running_mean "," res_conv.layer4.0.bn1.running_var "," res_conv.layer4.0.conv2.weight "," res_conv.layer4.0.bn2.weight " , "res_conv.layer4.0.bn2.bias", "res_conv.layer4.0.bn2.running_mean", "res_conv.layer4.0.bn2.running_var", "res_conv.layer4.0.dow nsample.0.weight "," res_conv.layer4.0.downsample.1.weight "," res_conv.layer4.0.downsample.1.bias "," res_conv.layer4.0.downsample.1.running_mean "," res_conv.layer4.0 " .downsample.1.running_var "," res_conv.layer4.1.conv1.weight "," res_conv.layer4.1.bn1.weight "," res_conv.layer4.1.bn1.bias "," res_conv.layer4.1 .bn1.running_mean "," res_conv.layer4.1.bn1.running_var "," res_conv.layer4.1.conv2.weight "," res_conv.layer4.1.bn2.weight "," res_conv. layer4.1.bn2.bias "," res_conv.layer4.1.bn2.running_mean "," res_conv.layer4.1.bn2.running_var "," res_conv.fc.weight "," res_conv.fc.bias ".
Unexpected key (s) in state_dict: "res_conv.0.weight", "res_conv.1.weight", "res_conv.1.bias", "res_conv.1.running_mean", "res_conv.1.running_var" , "res_conv .1.num_batches_tracked", "res_conv.4.0.conv1.weight", "res_conv.4.0.bn1.weight", "res_conv.4.0.bn1.bias", "res_conv.4.0.bn1.running_mean", " res_conv.4.0 .bn1.running_var "," res_conv.4.0.bn1.num_batches_tracked "," res_conv.4.0.conv2.weight "," res_conv.4.0.bn2.weight "," res_conv.4.0.bn2.bias "," res_conv.4.0. res_conv.4.0 ".bn2.running_mean", "res_conv.4.0.bn2.running_var", "res_conv.4.0.bn2.num_batches_tracked", "res_conv.4.1.conv1.weight", "res_conv.4.1.bn1.weight", "res_conv.4.1 .bn1.bias", "res_conv.4.1.bn1.running_mean", "res_conv.4.1.bn1.running_var", "res_conv.4.1.bn1.num_batches_tracked", "res_conv.4.1.conv2.weight", "res_conv.4.1 .bn2.weight", "res_conv.4.1.bn2.bias", "res_conv.4.1.bn2.running_mean", "res_conv.4.1.bn2.running_var", "res_conv.4.1.bn2.num_batches_tracked", "res_conv.5.0 .conv1.weight", "res _conv.5.0.bn1.weight "," res_conv.5.0.bn1.b ias "," res_conv.5.0.bn1.running_mean "," res_conv.5.0.bn1.running_var "," res_conv.5.0.bn1.num_batches_tracked ", "res_conv.5.0.conv2.weight", "res_conv.5.0.bn2. weight "," res_conv.5.0.bn2.bias "," res_conv.5.0.bn2.running_mean "," res_conv.5.0.bn2.running_var "," res_conv.5.0.bn2.num_batches_tracked "," res_conv.5.0.downsample. 0.weight "," res_conv.5.0.downsample.1.weight "," res_conv.5.0.downsample.1.bias "," res_conv.5.0.downsample.1.running_mean "," res_conv.5.0.downsample.1. running_var "," res_conv.5.0.downsample.1.num_batches_tracked "," res_conv.5.1.conv1.weight "," res_conv.5.1.bn1.weight "," res_conv.5.1.bn1.bias "," res_conv.5.1. bn1.running_mean "," res_conv.5.1.bn1.running_var "," res_conv.5.1.bn1.num_batches_tracked "," res_conv.5.1.conv2.weight "," res_conv.5.1.bn2.weight "," res_conv.5.1. bn2.bias "," res_conv.5.1.bn2.running_mean "," res_conv.5.1.bn2.running_var "," res_conv.5.1.bn2.num_batches_tracked "," res_conv.6.0.conv1.weight "," res_conv.6.0. bn1.weight "," res_conv.6.0.bn1.bias "," res_conv.6. 0.bn1.running_mean "," res_conv.6.0.bn1.running_var "," res_conv.6.0.bn1.num_batches_tracked "," res_conv.6.0.conv2.weight "," res_conv.6.0.bn2.weight "," res_conv. 6.0.bn2.bias "," res_conv.6.0.bn2.running_mean "," res_conv.6.0.bn2.running_var "," res_conv.6.0.bn2.num_batches_tracked "," res_conv.6.0.downsample.0.weight "," res_conv.6.0.downsample.1.weight "," res_conv.6.0.downsample.1.bias "," res_conv.6.0.downsample.1.running_mean "," res_conv.6.0.downsample.1.running_var "," res_conv. 6.0.downsample.1.num_batches_tracked "," res_conv.6.1.conv1.weight "," res_conv.6.1.bn1.weight "," res_conv.6.1.bn1.bias "," res_conv.6.1.bn1.running_mean "," res_conv.6.1.bn1.running_var "," res_conv.6.1.bn1.num_batches_tracked "," res_conv.6.1.conv2.weight "," res_conv.6.1.bn2.weight "," res_conv.6.1.bn2.bias "," res_conv.6.1.bn2.running_mean "," res_conv.6.1.bn2.running_var "," res_conv.6.1.bn2.num_batches_tracked ".

Does anyone know why this appears and how can I fix it? Help me, please.

Additional Information: I have correctly installed and tested python3.7, cuda10.1, pytorch1.0.1 on Ubuntu 18.04.