according to broadcasting rules
If two tensors  x ,  y  are “broadcastable”, the resulting tensor size is calculated as follows:

If the number of dimensions of  x  and  y  are not equal, prepend 1 to the dimensions of the tensor with fewer dimensions to make them equal length.
Then, for each dimension size, the resulting dimension size is the max of the sizes of  x  and  y  along that dimension.

x = torch.randn(1, 1, 0)

y = torch.randn(4, 1, 1)

(x + y).shape

torch.Size([4, 1, 0])
according to the above rules, shouldn’t it have been 4, 1, 1, just y, or give an error?