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

Function test_reduce

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

Source from the content-addressed store, hash-verified

96
97
98def test_reduce():
99 @trace(symbolic=True, capture_as_const=True)
100 def fwd(data):
101 x = data.sum(axis=2)
102 x = x.mean(axis=1)
103 return x
104
105 data = Tensor(np.random.random((1, 32, 32)))
106 result = fwd(data)
107 check_pygraph_dump(fwd, [data], [result])
108
109
110def test_typecvt():

Callers

nothing calls this directly

Calls 3

TensorClass · 0.90
check_pygraph_dumpFunction · 0.85
fwdFunction · 0.70

Tested by

no test coverage detected