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

Class ConvRelu2d

imperative/python/megengine/module/conv.py:812–818  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

810
811
812class ConvRelu2d(Conv2d):
813 r"""A fused :class:`~.Module` including :class:`~.module.Conv2d` and :func:`~.relu`.
814 Could be replaced with :class:`~.QATModule` version :class:`~.qat.ConvRelu2d` using :func:`~.quantize.quantize_qat`.
815 """
816
817 def forward(self, inp):
818 return relu(self.calc_conv(inp, self.weight, self.bias))
819
820
821class ConvTransposeRelu2d(ConvTranspose2d):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by 1

__init__Method · 0.72