I would expect BatchNorm on constant values (with zero eps) to somehow fail (throw some exception), but apparently it just outputs zeros…
Could somehow please explain what exactly happens when calling batchnorm?
Here’s a code sample:
x = torch.ones(2, 2, 3)
bn = torch.nn.BatchNorm1d(2, affine=False, eps=0)
bn(x)
>>> tensor([[[0., 0., 0.],
[0., 0., 0.]],
[[0., 0., 0.],
[0., 0., 0.]]])