Skip to content

Commit

Permalink
fix warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
suffian khan committed Apr 28, 2020
1 parent e20e67b commit 66295e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torch/onnx/utils.py
Expand Up @@ -43,8 +43,8 @@ def select_model_mode_for_export(model, mode):
if is_originally_training:
warnings.warn("You are exporting the model to ONNX while in training mode with "
"'train' parameter not specified. The model will default to inference mode export. "
"If you wish to export a training amenable ONNX model, specify train=TrainingMode.TRAIN or "
"train=TrainingMode.PRESERVE (to preserve the original model state) in torch.onnx.export().")
"If you wish to export a training amenable ONNX model, specify training=TrainingMode.TRAINING or "
"training=TrainingMode.PRESERVE (to preserve the original model state) in torch.onnx.export().")

# if mode == TrainingMode.EVAL or (mode == TrainingMode.PRESERVE and not is_originally_training) => is_training = False
is_export_training = False
Expand Down

0 comments on commit 66295e5

Please sign in to comment.