(self, x, mode: str)
| 18 | self._init_params() |
| 19 | |
| 20 | def forward(self, x, mode: str): |
| 21 | if mode == 'norm': |
| 22 | self._get_statistics(x) |
| 23 | x = self._normalize(x) |
| 24 | elif mode == 'denorm': |
| 25 | x = self._denormalize(x) |
| 26 | else: |
| 27 | raise NotImplementedError |
| 28 | return x |
| 29 | |
| 30 | def _init_params(self): |
| 31 | # initialize RevIN params: (C,) |
nothing calls this directly
no test coverage detected