Here is my code:
gpu1 = 0
gpu2 = 1
net1 = models.resnet50(pretrained=True)
net1.cuda(gpu1)
net1.load_state_dict(...)
net1.eval()
myLoader = Dataloader(...)
net2 = models.resnet50(pretrained=True)
net2.cuda(gpu2)

So i got a 4 GPUs server (id = 0, 1, 2, 3 respectively), and i designated two GPUs for net1 and net2. But somewhere after net1.cuda(gpu1) and before net2.cuda(gpu2), a few memory of (gpu_id = 2) is used. In my case, (gpu_id = 2) has 881M memory occupied.
Can i get a clue on what’s going on? This did not happen when i run the same codes on another dataset.