How do I use torch.stack?
How do I use torch.stack? : SOLUTION 1 : Stacking requires same number of dimensions. One way would be to unsqueeze and stack. For example: SOLUTION 2 : Using pytorch 1.2 or 1.4 arjoonn’s answer did not work for me. Instead of torch.stack I have used torch.cat with pytorch 1.2 and 1.4: If you want to use torch.stack the dimensions of … Read more