Skip to content

Commit d229c7a

Browse files
committed
finally got sphinx format right
1 parent 055ceda commit d229c7a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

monai/transforms/regularization/array.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,18 @@ def __call__(self, data: torch.Tensor, labels: torch.Tensor | None = None):
8888

8989
class CutMix(Mixer):
9090
"""CutMix augmentation as described in:
91-
Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, Youngjoon Yoo.
92-
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features,
93-
ICCV 2019
91+
Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, Youngjoon Yoo.
92+
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features,
93+
ICCV 2019
9494
95-
Class derived from :py:class:`monai.transforms.Mixer`. See corresponding
96-
documentation for details on the constructor parameters. Here, alpha not only determines
97-
the mixing weight but also the size of the random rectangles used during for mixing.
98-
Please refer to the paper for details.
95+
Class derived from :py:class:`monai.transforms.Mixer`. See corresponding
96+
documentation for details on the constructor parameters. Here, alpha not only determines
97+
the mixing weight but also the size of the random rectangles used during for mixing.
98+
Please refer to the paper for details.
9999
100-
The most common use case is something close to:
100+
The most common use case is something close to:
101+
102+
.. code-block:: python
101103
102104
cm = CutMix(batch_size=8, alpha=0.5)
103105
for batch in loader:
@@ -106,6 +108,7 @@ class CutMix(Mixer):
106108
output = model(augimg)
107109
loss = loss_function(output, auglabels)
108110
...
111+
109112
"""
110113

111114
def apply(self, data: torch.Tensor):

0 commit comments

Comments
 (0)