Skip to content

Commit ca8fcb2

Browse files
fix(networks): render LayerNormNd shape notation as literals
The channels-first and channels-last shapes in the class docstring were written as bare tuples, so docutils read the leading asterisk of `*spatial` as the start of inline emphasis and the docs build failed on the resulting warning. Mark them up as inline literals instead. Signed-off-by: VenkateswarluNagineni <venkates2002@tamu.edu>
1 parent b260dbf commit ca8fcb2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

monai/networks/layers/layer_norm_nd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class LayerNormNd(nn.Module):
2020
Layer normalization over the channel dimension of a channels-first tensor.
2121
2222
`torch.nn.LayerNorm` normalizes over the trailing dimensions, so it expects a channels-last layout
23-
such as (batch, *spatial, channel). Convolutional feature maps in MONAI are channels-first,
24-
(batch, channel, *spatial), and this module normalizes those over the channel dimension only,
23+
such as ``(batch, *spatial, channel)``. Convolutional feature maps in MONAI are channels-first,
24+
``(batch, channel, *spatial)``, and this module normalizes those over the channel dimension only,
2525
for any number of spatial dimensions.
2626
2727
Args:

0 commit comments

Comments
 (0)