Today I retried the code, and there is no such bug. I do not know why. My code is something like this:
    model_list = ['vgg11_bn', 'vgg13_bn', 'vgg16_bn', 'vgg19_bn']
    for mdl_name in model_list:
        print(mdl_name)
        mdl_path = os.path.join(mdl_result_path, mdl_name)
        print(mdl_path)
        try:
            mdl_file = GetLatestFile(mdl_path)
            print('{} is loaded.'.format(mdl_file))
        except:
            print('The result for {} does not exist.'.format(mdl_name))
            continue

        mdl = pretrainedmodels.__dict__[mdl_name](num_classes=1000, pretrained='imagenet')

        ...

        mdl.load_state_dict(torch.load(mdl_file))

When there is the bug, it seems that the ‘try except’ part is not executed correctly, and I guess the mdl is still something from previous iteration (e.g. vgg11_bn). The output is as follows:
vgg13_bn
~/results/vgg13_bn
Traceback (most recent call last):
  File "InterValid.py", line 119, in <module>
    if __name__ == '__main__':
  File "InterValid.py", line 87, in main

  File "~/.conda/envs/myenv/lib/python3.6/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for VGG:

I change the model list to [‘vgg13_bn’], and now it works fine.
I have no idea why the try except is not executed correctly …