What’s the difference between reshape and view in pytorch?
torch.view has existed for a long time. It will return a tensor with the new shape. The returned tensor will share the underling data with the original tensor. See the documentation here. On the other hand, it seems that torch.reshape has been introduced recently in version 0.4. According to the document, this method will Returns … Read more