Created
October 11, 2019 16:43
-
-
Save vaibkumr/d9eb58703537241ec80f11ad3ab479b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
# The following will produce no error as the dimensions match | |
batch1= torch.zeros(64, 3, 100, 100, names=('N', 'C', 'H', 'W')) | |
batch2 = torch.zeros(64, 3, 100, 100, names=('N', 'C', 'H', 'W')) | |
batch3 = batch1 + batch2 | |
# The following will produce an error as the dimensions don't match | |
batch1= torch.zeros(64, 3, 100, 100, names=('N', 'C', 'H', 'W')) | |
batch2 = torch.zeros(64, 3, 100, 100, names=('N', 'C', 'W', 'H')) | |
batch3 = batch1 + batch2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment