(self, differentiable=True)
| 455 | """ |
| 456 | |
| 457 | def __init__(self, differentiable=True): |
| 458 | super(DiffJPEG, self).__init__() |
| 459 | if differentiable: |
| 460 | rounding = diff_round |
| 461 | else: |
| 462 | rounding = torch.round |
| 463 | |
| 464 | self.compress = CompressJpeg(rounding=rounding) |
| 465 | self.decompress = DeCompressJpeg(rounding=rounding) |
| 466 | |
| 467 | def forward(self, x, quality): |
| 468 | """ |
nothing calls this directly
no test coverage detected