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

Function sigmoid

imperative/python/test/unit/functional/test_functional.py:685–686  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

683 label2_shape = (2, 3)
684
685 def sigmoid(x):
686 return 1 / (1 + np.exp(-x))
687
688 def compare_fn(x, y):
689 np.testing.assert_allclose(x.numpy(), y, atol=5e-4)

Callers 1

Calls 1

expMethod · 0.45

Tested by

no test coverage detected