MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / forward

Method forward

quantize/int_linear_fake.py:39–51  ·  view source on GitHub ↗
(self, input: torch.Tensor)

Source from the content-addressed store, hash-verified

37
38
39 def forward(self, input: torch.Tensor):
40 if self.use_weight_quant:
41 weight = self.weight_quantizer(self.weight)
42 bias = self.bias
43 else:
44 weight = self.weight
45 bias = self.bias
46
47
48 out = self.fwd_func(input, weight, bias, **self.fwd_kwargs)
49
50
51 return out
52
53 def set_quant_state(self, weight_quant: bool = False):
54 self.use_weight_quant = weight_quant

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected