Should have probably mentioned this earlier, I am using pytorch 0.3.1, is there an equivalent?
Edit:
From the https://pytorch.org/blog/pytorch-0_4_0-migration-guide/ :

The  volatile  flag is now deprecated and has no effect. Previously, any computation that involves a  Variable  with  volatile=True  wouldn’t be tracked by  autograd . This has now been replaced by a set of more flexible context managers 1 including  torch.no_grad() ,  torch.set_grad_enabled(grad_mode) , and others

Maybe I didn’t understand this fully, but how would setting volatile to True for the batch Variable disable the autograph build?