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

Method forward

imperative/python/megengine/module/vision.py:820–830  ·  view source on GitHub ↗
(self, inp)

Source from the content-addressed store, hash-verified

818 self.imode = imode
819
820 def forward(self, inp):
821 assert isinstance(
822 inp, Tensor
823 ), "expected input is megengine.Tensor, got {}".format(type(inp))
824 if self.format not in ["NCHW", "NHWC"]:
825 raise RuntimeError(
826 "expect input Tensor format to be NCHW or NHWC, got format {}".format(
827 self.format
828 )
829 )
830 return resize(inp, self.size, self.format, self.imode)
831
832
833class Rot90(Module):

Callers

nothing calls this directly

Calls 2

resizeFunction · 0.50
formatMethod · 0.45

Tested by

no test coverage detected