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

Class LinearBnRelu1d

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

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

Source from the content-addressed store, hash-verified

42
43
44class LinearBnRelu1d(_LinearBnActivation1d):
45 r"""A fused :class:`~.Module` including :class:`~.module.Linear`, :class:`~.module.BatchNorm1d` and :func:`~.relu`.
46 Could be replaced with :class:`~.QATModule` version :class:`~.qat.LinearBnRelu1d` using :func:`~.quantize.quantize_qat`.
47 """
48
49 def forward(self, inp):
50 return relu(self.bn(self.linear(inp)))

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by 1

__init__Method · 0.72