def test_save_to_disk_on_size_threshold(self): model = onnx_from_path(ONNX_MODELS["const_foldable"].path) model = infer_shapes(model, save_to_disk_threshold_bytes=0) self.check_model(model)
def test_path(self): model = infer_shapes(ONNX_MODELS["identity_identity"].path) self.check_model(model)
def test_external_data(self, set_data_dir): model = ONNX_MODELS["ext_weights_same_dir"] model = infer_shapes( model.path, external_data_dir=model.ext_data if set_data_dir else None) self.check_model(model)
def test_model(self): original_model = onnx_from_path(ONNX_MODELS["identity_identity"].path) model = infer_shapes(original_model) self.check_model(model)