k=torch.tensor([2,1])
k= k.view(1,2)
Something like
k.view_(1,2)
k=torch.tensor([2,1])
k= k.view(1,2)
Something like
k.view_(1,2)
I think this is mostly historical as .view()
is so cheap anyway that you don’t really need to do it inplace.