Suppose I do this:
x = Variable(torch.rand(3,5))
y = torch.Tensor(torch.rand(3,5))
print(x + y)

It gives error. I can use Variable.data if I want the output to be of Tensor type. But I want the sum to be a Variable. How can I do this?

This example is trivial. When both x and y are matrices, things get complicated (like doing operation between a Variable and a Tensor that has come through register_buffer).
I am new to PyTorch. So is there a good reference that explain all these things?