Skip to content

Commit 366dda9

Browse files
committed
only save pb file at debug mode
1 parent 1ee0bed commit 366dda9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/run_pretrained_models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def run_caffe2(self, name, model_proto, inputs):
170170
def run_onnxruntime(self, name, model_proto, inputs):
171171
"""Run test against onnxruntime backend."""
172172
import onnxruntime as rt
173-
model_path = utils.save_onnx_model(TEMP_DIR, name, inputs, model_proto, include_test_data=True, as_text=True)
173+
model_path = utils.save_onnx_model(TEMP_DIR, name, inputs, model_proto, include_test_data=True,
174+
as_text=utils.is_debug_mode())
174175
logger.info("Model saved to %s", model_path)
175176
m = rt.InferenceSession(model_path)
176177
results = m.run(self.output_names, inputs)

0 commit comments

Comments
 (0)