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

Method __init__

quantization/qmodule.py:32–35  ·  view source on GitHub ↗
(self, module, scales)

Source from the content-addressed store, hash-verified

30
31class ScaledActivation(nn.Module):
32 def __init__(self, module, scales):
33 super().__init__()
34 self.act = module
35 self.scales = nn.Parameter(scales.data)
36
37 def forward(self, x):
38 return self.act(x) / self.scales.view(1, 1, -1).to(x.device)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected