(self)
| 502 | os.remove(global_layout_transform_model) |
| 503 | |
| 504 | def test_network_basic_mem(self): |
| 505 | network = LiteNetwork() |
| 506 | with open(self.model_path, "rb") as file: |
| 507 | network.load(file) |
| 508 | |
| 509 | input_name = network.get_input_name(0) |
| 510 | input_tensor = network.get_io_tensor(input_name) |
| 511 | output_name = network.get_output_name(0) |
| 512 | output_tensor = network.get_io_tensor(output_name) |
| 513 | |
| 514 | assert input_tensor.layout.shapes[0] == 1 |
| 515 | assert input_tensor.layout.shapes[1] == 3 |
| 516 | assert input_tensor.layout.shapes[2] == 224 |
| 517 | assert input_tensor.layout.shapes[3] == 224 |
| 518 | assert input_tensor.layout.data_type == LiteDataType.LITE_FLOAT |
| 519 | assert input_tensor.layout.ndim == 4 |
| 520 | |
| 521 | self.do_forward(network) |
| 522 | |
| 523 | |
| 524 | class TestDiscreteInputNet(unittest.TestCase): |
nothing calls this directly
no test coverage detected