Hi,
If you have two GPUs, you can use the DataParallel module to use both GPUs which will allow you to double the batch size.
Another approach is to compute the whole gradient in multiple steps:
# effective_batch = 4 * batch
processed_batch = 0
for batch in dataloader:
  loss = get_loss(batch)
  loss.backward()
  processed_batch += 1
  if processed_batch == 4:
    opt.step()
    opt.zero_grad()
    processed_batch = 0