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

Method __init__

ram/utils/diffjpeg.py:215–220  ·  view source on GitHub ↗
(self, rounding=torch.round)

Source from the content-addressed store, hash-verified

213 """
214
215 def __init__(self, rounding=torch.round):
216 super(CompressJpeg, self).__init__()
217 self.l1 = nn.Sequential(RGB2YCbCrJpeg(), ChromaSubsampling())
218 self.l2 = nn.Sequential(BlockSplitting(), DCT8x8())
219 self.c_quantize = CQuantize(rounding=rounding)
220 self.y_quantize = YQuantize(rounding=rounding)
221
222 def forward(self, image, factor=1):
223 """

Callers

nothing calls this directly

Calls 7

RGB2YCbCrJpegClass · 0.85
ChromaSubsamplingClass · 0.85
BlockSplittingClass · 0.85
DCT8x8Class · 0.85
CQuantizeClass · 0.85
YQuantizeClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected