It looks like torch.autograd does not have a “grad” function?
I’m using the latest pytorch (0.1.12_2)
ImportError                               Traceback (most recent call last)
 in ()
1 import torch
2 import torch.nn as nn
----> 3 from torch.autograd import Variable, grad
4 import torchvision.transforms as transforms
5
ImportError: cannot import name grad