Skip to content

Commit

Permalink
finally got sphinx format right
Browse files Browse the repository at this point in the history
  • Loading branch information
juampatronics committed Mar 25, 2024
1 parent 055ceda commit d229c7a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions monai/transforms/regularization/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,18 @@ def __call__(self, data: torch.Tensor, labels: torch.Tensor | None = None):

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

def apply(self, data: torch.Tensor):
Expand Down

0 comments on commit d229c7a

Please sign in to comment.