SyntaxFix
Write A Post
Hire A Developer
Questions
or you can use this, the '-1' means you don't have to specify the number of the elements.
In [3]: a.view(1,-1) Out[3]: 1 2 3 4 5 [torch.FloatTensor of size 1x5]