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

Method test_network_shared_data

lite/pylite/test/test_network.py:146–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

144 self.do_forward(network)
145
146 def test_network_shared_data(self):
147 network = LiteNetwork()
148 network.load(self.model_path)
149
150 input_name = network.get_input_name(0)
151 input_tensor = network.get_io_tensor(input_name)
152 output_name = network.get_output_name(0)
153 output_tensor = network.get_io_tensor(output_name)
154
155 input_tensor.set_data_by_share(self.input_data)
156 for i in range(3):
157 network.forward()
158 network.wait()
159
160 output_data = output_tensor.to_numpy()
161 self.check_correct(output_data)
162
163 def test_network_get_name(self):
164 network = LiteNetwork()

Callers

nothing calls this directly

Calls 10

loadMethod · 0.95
get_input_nameMethod · 0.95
get_io_tensorMethod · 0.95
get_output_nameMethod · 0.95
forwardMethod · 0.95
waitMethod · 0.95
LiteNetworkClass · 0.85
set_data_by_shareMethod · 0.80
to_numpyMethod · 0.45
check_correctMethod · 0.45

Tested by

no test coverage detected