Classifier demo: Check the mode before checking classifierModel.

For #65.
This commit is contained in:
Brandon Amos 2015-12-03 13:47:37 -05:00
parent 0efe4fe391
commit 5e6977c8cd
1 changed files with 3 additions and 2 deletions

View File

@ -145,9 +145,10 @@ if __name__ == '__main__':
args = parser.parse_args() args = parser.parse_args()
if args.classifierModel.endswith(".t7"): if args.mode == 'infer' and args.classifierModel.endswith(".t7"):
raise Exception(""" raise Exception("""
Torch network model passed as the classification model. Torch network model passed as the classification model,
which should be a Python pickle (.pkl)
See the documentation for the distinction between the Torch See the documentation for the distinction between the Torch
network and classification models: network and classification models: