MCPcopy Create free account
hub / github.com/PaddlePaddle/PaddleDetection / bench_log

Function bench_log

deploy/python/infer.py:51–65  ·  view source on GitHub ↗
(detector, img_list, model_info, batch_size=1, name=None)

Source from the content-addressed store, hash-verified

49
50
51def bench_log(detector, img_list, model_info, batch_size=1, name=None):
52 mems = {
53 'cpu_rss_mb': detector.cpu_mem / len(img_list),
54 'gpu_rss_mb': detector.gpu_mem / len(img_list),
55 'gpu_util': detector.gpu_util * 100 / len(img_list)
56 }
57 perf_info = detector.det_times.report(average=True)
58 data_info = {
59 'batch_size': batch_size,
60 'shape': "dynamic_shape",
61 'data_num': perf_info['img_num']
62 }
63 log = PaddleInferBenchmark(detector.config, model_info, data_info,
64 perf_info, mems)
65 log(name)
66
67
68class Detector(object):

Callers 6

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.70

Calls 2

reportMethod · 0.45

Tested by

no test coverage detected