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

Method calc_linear

imperative/python/megengine/module/linear.py:68–69  ·  view source on GitHub ↗
(self, x, weight, bias)

Source from the content-addressed store, hash-verified

66 init.zeros_(self.bias)
67
68 def calc_linear(self, x, weight, bias):
69 return linear(x, weight, bias, compute_mode=self.compute_mode)
70
71 def forward(self, x):
72 return self.calc_linear(x, self.weight, self.bias)

Callers 5

forwardMethod · 0.95
calc_linear_qatMethod · 0.95
forwardMethod · 0.95
forwardMethod · 0.80
calc_linear_bn_qatMethod · 0.80

Calls 1

linearFunction · 0.85

Tested by

no test coverage detected