MCPcopy Create free account
hub / github.com/DragonisCV/RAM / __init__

Method __init__

ram/utils/diffjpeg.py:457–465  ·  view source on GitHub ↗
(self, differentiable=True)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 3

CompressJpegClass · 0.85
DeCompressJpegClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected