MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / forward

Method forward

imperative/python/megengine/module/qat/linear.py:23–26  ·  view source on GitHub ↗
(self, inp)

Source from the content-addressed store, hash-verified

21 return linear
22
23 def forward(self, inp):
24 w_qat = self.apply_quant_weight(self.weight)
25 b_qat = self.apply_quant_bias(self.bias, inp, w_qat)
26 return self.apply_quant_activation(self.calc_linear(inp, w_qat, b_qat))
27
28 @classmethod
29 def from_float_module(cls, float_module: Float.Linear):

Callers

nothing calls this directly

Calls 4

calc_linearMethod · 0.95
apply_quant_weightMethod · 0.80
apply_quant_biasMethod · 0.80

Tested by

no test coverage detected