I have a (faster r-cnn) model that currently supports a variable-sized input tensor of size (1,3,H,W) with an image batch size of 1. I’d like to run this model on two GPUs, using 1 image per GPU.
However, I can’t figure out how to send 2 variable-sized input tensors to each gpu. The example here assumes that the variable
input_var is a concatenation of the inputs along the batch dimension:
>>> net = torch.nn.DataParallel(model, device_ids=[0, 1, 2]) >>> output = net(input_var)
How would I distribute a model of image batch size 2 and variable input H and W across 2 gpus?