I have tried to add "torch.nn.DataParallel" to every model, and modifies the batch_size. However, "nvidia-smi" still shows only one gpu is using. I cannot figure out what's wrong. Thank you in advance!
Also, after adding "torch.nn.DataParallel" and changing the batchsize, the code cannot run as we expected. The state is shown in the following pictures.
I have tried to add "torch.nn.DataParallel" to every model, and modifies the batch_size. However, "nvidia-smi" still shows only one gpu is using. I cannot figure out what's wrong. Thank you in advance!