share memory space so input should contiguous
-1 means auto infer
What does -1 mean in pytorch view?
As the question says, what does -1 do in pytorch view?
>>> a = torch.arange(1, 17)
>>> a
tensor([ 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.,
11., 12., 1...
https://stackoverflow.com/questions/50792316/what-does-1-mean-in-pytorch-view/50793899#50793899
torch.Tensor.view — PyTorch 2.0 documentation
https://pytorch.org/docs/stable/generated/torch.Tensor.view.html

Seonglae Cho