Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ compare_fn
Function
compare_fn
imperative/python/test/unit/functional/test_functional.py:688–689 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
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)
690
691
np.random.seed(123)
692
data1 = np.random.uniform(size=data1_shape).astype(np.float32)
Callers
1
check_results
Function · 0.85
Calls
1
numpy
Method · 0.45
Tested by
no test coverage detected