Hi there!
This is a question that might sound simple, but I can’t find any information that actually works when I implement it.
So, I have to models (net1 and net2), and I have two GPUs (“cuda:0” and “cuda:1”). I have the training and test dataloaders (train_dl, test_dl). I just want to train both models simultaneously, like:
net1.to(decive1)
net2.to(device2)
accuracy1 = training(net1)
accuracy2 = training(net2)
How do I do this? How do I make sure these last two functions don’t execute sequentially? I want them to execute at the same time. I have read about something related to “spawn” but I have really no idea how to implement that.
Thank you!