For example I have 2 tensor:
x = torch.randn(4)
y = torch.randn(2, 2)
If I want to copy y to x I have to do this:
x.copy_(y.view(x.shape))
Is there any more efficient ways to do it ? I notice that torch7 is able to do x:copy(y) but pytorch can’t.