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

Method forward

imperative/python/megengine/module/dropout.py:35–39  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

33 self.drop_prob = drop_prob
34
35 def forward(self, inputs):
36 if self.training:
37 return dropout(inputs, self.drop_prob, training=True)
38 else:
39 return inputs
40
41 def _module_info_string(self) -> str:
42 return "drop_prob={drop_prob}".format(drop_prob=self.drop_prob)

Callers

nothing calls this directly

Calls 1

dropoutFunction · 0.85

Tested by

no test coverage detected