(
self, x: torch.Tensor, q: torch.Tensor, a: int = DEFAULT_INT_INPUT
)
| 51 | self.method_names = ["encode", "decode"] |
| 52 | |
| 53 | def encode( |
| 54 | self, x: torch.Tensor, q: torch.Tensor, a: int = DEFAULT_INT_INPUT |
| 55 | ) -> torch.Tensor: |
| 56 | z = x.clone() |
| 57 | torch.mul(self.a, x, out=z) |
| 58 | y = x.clone() |
| 59 | torch.add(z, self.b, alpha=a, out=y) |
| 60 | torch.add(y, q, out=y) |
| 61 | return y |
| 62 | |
| 63 | def decode( |
| 64 | self, x: torch.Tensor, q: torch.Tensor, a: int = DEFAULT_INT_INPUT |
no test coverage detected