MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / forward

Method forward

quantization/quantizer.py:14–17  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

12class Round(Function):
13 @staticmethod
14 def forward(self, input):
15 sign = torch.sign(input)
16 output = sign * torch.floor(torch.abs(input) + 0.5)
17 return output
18
19 @staticmethod
20 def backward(self, grad_output):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected