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

Method __init__

ram/utils/diffjpeg.py:382–387  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

380 """
381
382 def __init__(self):
383 super(YCbCr2RGBJpeg, self).__init__()
384
385 matrix = np.array([[1., 0., 1.402], [1, -0.344136, -0.714136], [1, 1.772, 0]], dtype=np.float32).T
386 self.shift = nn.Parameter(torch.tensor([0, -128., -128.]))
387 self.matrix = nn.Parameter(torch.from_numpy(matrix))
388
389 def forward(self, image):
390 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected