Apply affine range normalization over input image.
(self, x: torch.Tensor)
| 62 | self.bias = output_min - input_min * self.scale |
| 63 | |
| 64 | def forward(self, x: torch.Tensor) -> torch.Tensor: |
| 65 | """Apply affine range normalization over input image.""" |
| 66 | if self.scale != 1.0: |
| 67 | x = x * self.scale |
| 68 | |
| 69 | if self.bias != 0.0: |
| 70 | x = x + self.bias |
| 71 | |
| 72 | return x |
| 73 | |
| 74 | |
| 75 | class MobileNetNormalizer(AffineRangeNormalizer): |
nothing calls this directly
no outgoing calls
no test coverage detected