@@ -140,7 +140,7 @@ def _transform(
140140 return inpt
141141
142142
143- class _BaseMixupCutmix (Transform ):
143+ class _BaseMixUpCutMix (Transform ):
144144 def __init__ (self , * , alpha : float = 1.0 , num_classes : int , labels_getter = "default" ) -> None :
145145 super ().__init__ ()
146146 self .alpha = float (alpha )
@@ -203,10 +203,10 @@ def _mixup_label(self, label: torch.Tensor, *, lam: float) -> torch.Tensor:
203203 return label .roll (1 , 0 ).mul_ (1.0 - lam ).add_ (label .mul (lam ))
204204
205205
206- class Mixup ( _BaseMixupCutmix ):
206+ class MixUp ( _BaseMixUpCutMix ):
207207 """[BETA] Apply MixUp to the provided batch of images and labels.
208208
209- .. v2betastatus:: Mixup transform
209+ .. v2betastatus:: MixUp transform
210210
211211 Paper: `mixup: Beyond Empirical Risk Minimization <https://arxiv.org/abs/1710.09412>`_.
212212
@@ -227,7 +227,7 @@ class Mixup(_BaseMixupCutmix):
227227 num_classes (int): number of classes in the batch. Used for one-hot-encoding.
228228 labels_getter (callable or "default", optional): indicates how to identify the labels in the input.
229229 By default, this will pick the second parameter a the labels if it's a tensor. This covers the most
230- common scenario where this transform is called as ``Mixup ()(imgs_batch, labels_batch)``.
230+ common scenario where this transform is called as ``MixUp ()(imgs_batch, labels_batch)``.
231231 It can also be a callable that takes the same input as the transform, and returns the labels.
232232 """
233233
@@ -252,10 +252,10 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
252252 return inpt
253253
254254
255- class Cutmix ( _BaseMixupCutmix ):
255+ class CutMix ( _BaseMixUpCutMix ):
256256 """[BETA] Apply CutMix to the provided batch of images and labels.
257257
258- .. v2betastatus:: Cutmix transform
258+ .. v2betastatus:: CutMix transform
259259
260260 Paper: `CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
261261 <https://arxiv.org/abs/1905.04899>`_.
@@ -277,7 +277,7 @@ class Cutmix(_BaseMixupCutmix):
277277 num_classes (int): number of classes in the batch. Used for one-hot-encoding.
278278 labels_getter (callable or "default", optional): indicates how to identify the labels in the input.
279279 By default, this will pick the second parameter a the labels if it's a tensor. This covers the most
280- common scenario where this transform is called as ``Cutmix ()(imgs_batch, labels_batch)``.
280+ common scenario where this transform is called as ``CutMix ()(imgs_batch, labels_batch)``.
281281 It can also be a callable that takes the same input as the transform, and returns the labels.
282282 """
283283
0 commit comments