MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / print_op_stats

Function print_op_stats

imperative/python/megengine/utils/module_stats.py:282–296  ·  view source on GitHub ↗
(flops)

Source from the content-addressed store, hash-verified

280
281
282def print_op_stats(flops):
283 header = [
284 "name",
285 "class_name",
286 "input_shapes",
287 "output_shapes",
288 "flops",
289 "flops_cum",
290 "percentage",
291 "bar",
292 ]
293 if _receptive_field_enabled:
294 header.insert(4, "receptive_field")
295 header.insert(5, "stride")
296 logger.info("flops stats: \n" + tabulate.tabulate(dict2table(flops, header=header)))
297
298
299def get_param_stats(param: Tensor):

Callers 2

visualizeFunction · 0.90
module_statsFunction · 0.85

Calls 3

dict2tableFunction · 0.85
insertMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected