Solved by god_sp33d in post #2 
              
              
                Hi, 
“.view” reshapes the tensor to a new size. It takes in, the new size to which we want our tensor to be reshaped. Now, in your code, what you are trying to achieve is keep the last 3 dimensions the same (because of [-3:]) and combine the initial dimensions. 
For ex: 
a = torch.rand((1,2,3,4,5,6)…