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

Function print_single_query

demo/BERT/inference_c.py:183–189  ·  view source on GitHub ↗
(eval_time_elapsed, prediction, nbest_json)

Source from the content-addressed store, hash-verified

181 return eval_time_elapsed, prediction, nbest_json
182
183 def print_single_query(eval_time_elapsed, prediction, nbest_json):
184 print("------------------------")
185 print("Running inference in {:.3f} Sentences/Sec".format(1.0/eval_time_elapsed))
186 print("------------------------")
187
188 print("Answer: '{}'".format(prediction))
189 print("With probability: {:.3f}".format(nbest_json[0]['probability'] * 100.0))
190
191 if squad_examples:
192 all_predictions = collections.OrderedDict()

Callers 1

inference_c.pyFile · 0.70

Calls 1

printFunction · 0.85

Tested by

no test coverage detected