(self, spatial_shape: Sequence[int])
| 3135 | ) |
| 3136 | |
| 3137 | def randomize(self, spatial_shape: Sequence[int]) -> None: |
| 3138 | super().randomize(None) |
| 3139 | if not self._do_transform: |
| 3140 | return |
| 3141 | self.distort_steps = tuple( |
| 3142 | tuple(1.0 + self.R.uniform(low=self.distort_limit[0], high=self.distort_limit[1], size=n_cells + 1)) |
| 3143 | for n_cells in ensure_tuple_rep(self.num_cells, len(spatial_shape)) |
| 3144 | ) |
| 3145 | |
| 3146 | def __call__( |
| 3147 | self, img: torch.Tensor, mode: str | None = None, padding_mode: str | None = None, randomize: bool = True |
no test coverage detected