MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / print_single_query

Function print_single_query

demo/BERT/inference.py:223–229  ·  view source on GitHub ↗
(eval_time_elapsed, prediction, nbest_json)

Source from the content-addressed store, hash-verified

221 return eval_time_elapsed, prediction, nbest_json
222
223 def print_single_query(eval_time_elapsed, prediction, nbest_json):
224 print("------------------------")
225 print("Running inference in {:.3f} Sentences/Sec".format(args.batch_size/eval_time_elapsed))
226 print("------------------------")
227
228 print("Answer: '{}'".format(prediction))
229 print("With probability: {:.3f}".format(nbest_json[0]['probability'] * 100.0))
230
231 if squad_examples:
232 all_predictions = collections.OrderedDict()

Callers 1

inference.pyFile · 0.70

Calls 1

printFunction · 0.85

Tested by

no test coverage detected