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

Method do_forward

lite/pylite/test/test_global.py:28–40  ·  view source on GitHub ↗
(self, network, times=3)

Source from the content-addressed store, hash-verified

26 assert abs(out_data[i] - self.correct_data[i]) < error
27
28 def do_forward(self, network, times=3):
29 input_name = network.get_input_name(0)
30 input_tensor = network.get_io_tensor(input_name)
31 output_name = network.get_output_name(0)
32 output_tensor = network.get_io_tensor(output_name)
33
34 input_tensor.set_data_by_copy(self.input_data)
35 for i in range(times):
36 network.forward()
37 network.wait()
38
39 output_data = output_tensor.to_numpy()
40 self.check_correct(output_data)
41
42
43class TestGlobal(TestShuffleNet):

Callers 1

Calls 8

check_correctMethod · 0.95
set_data_by_copyMethod · 0.80
get_input_nameMethod · 0.45
get_io_tensorMethod · 0.45
get_output_nameMethod · 0.45
forwardMethod · 0.45
waitMethod · 0.45
to_numpyMethod · 0.45

Tested by

no test coverage detected