(self, network, times=3)
| 41 | assert abs(out_data[i] - self.correct_data[i]) < error |
| 42 | |
| 43 | def do_forward(self, network, times=3): |
| 44 | input_name = network.get_input_name(0) |
| 45 | input_tensor = network.get_io_tensor(input_name) |
| 46 | output_name = network.get_output_name(0) |
| 47 | output_tensor = network.get_io_tensor(output_name) |
| 48 | |
| 49 | input_tensor.set_data_by_copy(self.input_data) |
| 50 | for i in range(times): |
| 51 | network.forward() |
| 52 | network.wait() |
| 53 | |
| 54 | output_data = output_tensor.to_numpy() |
| 55 | self.check_correct(output_data) |
| 56 | |
| 57 | |
| 58 | class TestNetwork(TestShuffleNetCuda): |
no test coverage detected