diff --git a/tinygrad/tensor.py b/tinygrad/tensor.py index 810b3577f8..90bcbf2df9 100644 --- a/tinygrad/tensor.py +++ b/tinygrad/tensor.py @@ -928,7 +928,7 @@ class Tensor: shape = tuple(s if ax in argfix(axis) else 1 for ax, s in enumerate(self.shape)) x = self - mean.reshape(shape) if weight: x = x * weight.reshape(shape) - ret = x.mul(invstd.reshape(shape) if len(invstd.shape) == len(axis) else invstd) + ret = x.mul(invstd.reshape(shape) if len(invstd.shape) == len(argfix(axis)) else invstd) return (ret + bias.reshape(shape)) if bias else ret def dropout(self, p=0.5) -> Tensor: