(self, size)
| 482 | raise TypeError("The input parameter has a wrong type. ") |
| 483 | |
| 484 | def _get_table(self, size): |
| 485 | shape = (size, 1) |
| 486 | alpha = self._get_parameter(self.alpha, shape) |
| 487 | table = arange(255).astype("float32") |
| 488 | table = broadcast_to(table, (size, 255)) |
| 489 | table = 127 + mul((table - 127), alpha) |
| 490 | return clip(table, 0, 255) |
| 491 | |
| 492 | def forward(self, inp: Tensor) -> Tensor: |
| 493 | if inp.dtype.name == "uint8": |
no test coverage detected