Skip to content

Commit

Permalink
Merge pull request #364 from CBICA/sarthakpati-patch-1
Browse files Browse the repository at this point in the history
Ensure ONNX-related print only happens once during training
  • Loading branch information
sarthakpati committed Mar 22, 2022
2 parents 2ae23ff + e3578b9 commit 7bb82d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GANDLF/utils/modelio.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def save_model(model_dict, model, params, path, onnx_export=True):
torch.save(model_dict, path)

if onnx_export == False:
print("WARNING: Current model is not supported by ONNX/OpenVINO!")
if "onnx_print" not in params:
print("WARNING: Current model is not supported by ONNX/OpenVINO!")
params["onnx_print"] = True
return
else:
try:
Expand Down

0 comments on commit 7bb82d9

Please sign in to comment.