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

Method forward

imperative/python/test/unit/core/test_function.py:213–216  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

211 self.param = param
212
213 def forward(self, x):
214 y = 1 / (1 + F.exp(-x))
215 self.save_for_backward(y)
216 return y
217
218 def backward(self, grad_y):
219 (y,) = self.saved_tensors

Callers

nothing calls this directly

Calls 1

expMethod · 0.45

Tested by

no test coverage detected