Variable is a specific Pytorch class, which has been deprecated. I think they just use only Tensor now.
https://pytorch.org/docs/stable/autograd.html#variable-deprecated 18
For example:
hidden = torch.Tensor(hidden.data, requires_grad=True)