General semantics
- Each tensor has at least one dimension.
- When iterating over the dimension sizes, starting at the trailing dimension, the dimension size must either be equal, one of them is 1, or one of them does exist.
1 | x = torch.FloatTensor(5, 7, 3) |
1 | x = torch.FloatTensor(5, 1, 4, 1) |
In-place sementics
1 | x = torch.FloatTensor(5, 3, 4, 1) |
Backwards compatibility
1 | torch.add(torch.ones(4, 1), torch.randn(4)) |
1 | torch.utils.backcompat.broadcast_warning.enabled=True |