NervanaSystems / ngraph-tf

Bridge to connect nGraph with TensorFlow
Other
53 stars 16 forks source link

update regex, tolerance to verify accuracy #528

Closed sindhu-nervana closed 5 years ago

crlishka commented 5 years ago

As part of this PR, can you please change the "except:" handler in this code:

try:
    model_name, p = run_inference(args.model_name, models_dir)
    check_accuracy(model_name, p)
except:
    print("Model accuracy verification failed.")

To be something like:

try:
    model_name, p = run_inference(args.model_name, models_dir)
    check_accuracy(model_name, p)
except Exception as ex:
    print("Model accuracy verification failed.  Exception: %s" % str(ex))

With the current code, there is no information on what raised the exception. My proposed modifications will print that exception information out.