i have class for single gpu like:
class mmodel():
def setgpu(self, gpu)
    self.gpu = gpu
    self.disA.cuda(self.gpu)
    self.disB.cuda(self.gpu)
   self.disA2.cuda(self.gpu)
   self.disB2.cuda(self.gpu)
   self.enc_c.cuda(self.gpu)
   self.enc_a.cuda(self.gpu)
   self.gen.cuda(self.gpu)

Now in main function:
model = mmodel(opts)
model.setgpu(opts.gpu)
I want to run this model on 2 GPU’s anyone can help me? do i need to change the batch size? my batch size is 2: