I have trained ResNet50 on one GPU… Yes, I was reading other topics using DataParallel, but I have not found any solution for this kind of training…
Later, I use the model in an other way and I want to use multiple GPUs, but I get the following error:
Traceback (most recent call last):
  File "attack.py", line 57, in <module>
    model.load_state_dict(torch.load(settings.CHECKPOINT_PATH))
  File "/home/user/.conda/envs/bm/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
        Missing key(s) in state_dict: "module.conv1.0.weight", "module.conv1.1.weight", "module.conv1.1.bias", "module.conv1.1.running_mean", "module.conv1.1.running_var", "module.conv2_x.0.residual_function.0.weight", "module.conv2_x.0.residual_function.1.weight", "module.conv2_x.0.residual_function.1.bias",