(self, network, times=3)
| 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 | |
| 43 | class TestGlobal(TestShuffleNet): |
no test coverage detected