Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
test_binary_cross_entropy
Function · 0.70
Calls
1
exp
Method · 0.45
Tested by
no test coverage detected