From 0843f2ff97019faae4d99e3a58d22c420dd540de Mon Sep 17 00:00:00 2001 From: ayaangazali Date: Thu, 23 Jul 2026 16:33:08 -0700 Subject: [PATCH] Fix InstanceNorm Shape docstring to require at least 3 dimensions --- python/mlx/nn/layers/normalization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/mlx/nn/layers/normalization.py b/python/mlx/nn/layers/normalization.py index 56bcc3ccba..3a4b577a4d 100644 --- a/python/mlx/nn/layers/normalization.py +++ b/python/mlx/nn/layers/normalization.py @@ -25,7 +25,8 @@ class InstanceNorm(Module): affine (bool): Default: ``False``. Shape: - - Input: :math:`(..., C)` where :math:`C` is equal to :attr:`dims`. + - Input: :math:`(N, ..., C)` where :math:`C` is equal to :attr:`dims`. + The input must have at least 3 dimensions. - Output: Same shape as the input. Examples: