Thanks for opening the issue.
As pointed out by @tom, there seems to be an incompatibility between Tensor and Variable, and this is not a desired behavior. I’ve opened an issue in https://github.com/pytorch/pytorch/issues/2685 138.
Sorry for the trouble.