Hi,



 apaszke:

DataParallel is compatible with most forward functions


class Model():
     def __init__():
          ......

     def forward(input_data):
          ......

     def sample(input_data):
           ......


model = Model()
model = nn.DataParallel(model, device_ids=opt.gpus, dim=1)

model(input_data)  can work on multi-gpu,
but mode.module.sample(input_data) work on single gpu.
How to make  mode.module.sample(input_data)  working on multi-gpu?
I hope you can understand what I mean.
Thanks.