MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __init__

Method __init__

monai/transforms/regularization/dictionary.py:67–77  ·  view source on GitHub ↗
(
        self,
        keys: KeysCollection,
        batch_size: int,
        label_keys: KeysCollection | None = None,
        alpha: float = 1.0,
        allow_missing_keys: bool = False,
    )

Source from the content-addressed store, hash-verified

65 """
66
67 def __init__(
68 self,
69 keys: KeysCollection,
70 batch_size: int,
71 label_keys: KeysCollection | None = None,
72 alpha: float = 1.0,
73 allow_missing_keys: bool = False,
74 ) -> None:
75 super().__init__(keys, allow_missing_keys)
76 self.mixer = CutMix(batch_size, alpha)
77 self.label_keys = ensure_tuple(label_keys) if label_keys is not None else []
78
79 def set_random_state(self, seed: int | None = None, state: np.random.RandomState | None = None) -> CutMixd:
80 super().set_random_state(seed, state)

Callers

nothing calls this directly

Calls 3

ensure_tupleFunction · 0.90
CutMixClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected