I guess you are using pytorch <= 0.4.
Try to wrap the tensors with autograd.Variable.
from torch.autograd import Variable
input = Variable(input)
I guess you are using pytorch <= 0.4.
Try to wrap the tensors with autograd.Variable.
from torch.autograd import Variable
input = Variable(input)