That might be a bit tricky, as the volatile argument is not an attribute of the data anymore but of the workflow. You could probably write some workaround using torch.set_grad_enabled, but I’m not sure if this will fit your use case.
The proper way now would be to wrap the complete method in a with torch.no_grad() block. Would that work for you?