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

Function test_elemwise

imperative/python/test/unit/utils/test_network_node.py:83–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81
82
83def test_elemwise():
84 @trace(symbolic=True, capture_as_const=True)
85 def fwd(x, y):
86 z1 = x * y
87 z2 = x + y
88 z3 = z1 / z2
89 z3 = z3 ** 3
90 return z3
91
92 x = Tensor([1.0, 2.0])
93 y = Tensor([3.0, 5.0])
94 result = fwd(x, y)
95 check_pygraph_dump(fwd, [x, y], [result])
96
97
98def test_reduce():

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
check_pygraph_dumpFunction · 0.85
fwdFunction · 0.70

Tested by

no test coverage detected