Skip to content

Commit

Permalink
Change the model file extension from .pb to .onnx (onnx#541)
Browse files Browse the repository at this point in the history
* Change the model file extension from .pb to .onnx

* Rename existing model.pb to model.onnx

* Rename existing model.pb to model.onnx
  • Loading branch information
houseroad authored Feb 21, 2018
1 parent 535c8c1 commit cc9b6e6
Show file tree
Hide file tree
Showing 83 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion onnx/backend/test/cmd_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def prepare_dir(path):
'model_name': case.model_name,
}, f, sort_keys=True)
else:
with open(os.path.join(output_dir, 'model.pb'), 'wb') as f:
with open(os.path.join(output_dir, 'model.onnx'), 'wb') as f:
f.write(case.model.SerializeToString())
for i, (inputs, outputs) in enumerate(case.data_sets):
data_set_dir = os.path.join(
Expand Down
2 changes: 1 addition & 1 deletion onnx/backend/test/loader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def load_model_tests(data_dir=os.path.join(DATA_DIR, 'model'), kind=None):
# skip the non-dir files, such as generated __init__.py.
if not os.path.isdir(case_dir):
continue
if os.path.exists(os.path.join(case_dir, 'model.pb')):
if os.path.exists(os.path.join(case_dir, 'model.onnx')):
url = None
model_name = test_name[len('test_')]
model_dir = case_dir
Expand Down
2 changes: 1 addition & 1 deletion onnx/backend/test/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def run(test_self, device):
model_dir = self._prepare_model_data(model_test)
else:
model_dir = model_test.model_dir
model_pb_path = os.path.join(model_dir, 'model.pb')
model_pb_path = os.path.join(model_dir, 'model.onnx')
model = onnx.load(model_pb_path)
model_marker[0] = model
prepared_model = self.backend.prepare(model, device)
Expand Down

0 comments on commit cc9b6e6

Please sign in to comment.