Args: keys: keys of the corresponding items to be transformed. See also: :py:class:`monai.transforms.compose.MapTransform` repeats: the number of repetitions for each element. allow_missing_keys: don't raise exception if key is missing.
(self, keys: KeysCollection, repeats: int, allow_missing_keys: bool = False)
| 296 | backend = RepeatChannel.backend |
| 297 | |
| 298 | def __init__(self, keys: KeysCollection, repeats: int, allow_missing_keys: bool = False) -> None: |
| 299 | """ |
| 300 | Args: |
| 301 | keys: keys of the corresponding items to be transformed. |
| 302 | See also: :py:class:`monai.transforms.compose.MapTransform` |
| 303 | repeats: the number of repetitions for each element. |
| 304 | allow_missing_keys: don't raise exception if key is missing. |
| 305 | """ |
| 306 | super().__init__(keys, allow_missing_keys) |
| 307 | self.repeater = RepeatChannel(repeats) |
| 308 | |
| 309 | def __call__(self, data: Mapping[Hashable, NdarrayOrTensor]) -> dict[Hashable, NdarrayOrTensor]: |
| 310 | d = dict(data) |
nothing calls this directly
no test coverage detected