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

Class LinearBn1d

imperative/python/megengine/module/linear_bn.py:34–41  ·  view source on GitHub ↗

r"""A fused :class:`~.Module` including :class:`~.module.Linear` and :class:`~.module.BatchNorm1d`. Could be replaced with :class:`~.QATModule` version :class:`~.qat.LinearBn1d` using :func:`~.quantize.quantize_qat`.

Source from the content-addressed store, hash-verified

32
33
34class LinearBn1d(_LinearBnActivation1d):
35 r"""A fused :class:`~.Module` including :class:`~.module.Linear` and :class:`~.module.BatchNorm1d`.
36 Could be replaced with :class:`~.QATModule` version :class:`~.qat.LinearBn1d` using
37 :func:`~.quantize.quantize_qat`.
38 """
39
40 def forward(self, inp):
41 return self.bn(self.linear(inp))
42
43
44class LinearBnRelu1d(_LinearBnActivation1d):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by 1

__init__Method · 0.72