Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenGVLab/HumanBench
/ get_layer_param
Function
get_layer_param
PATH/helper/param_count.py:72–73 ·
view source on GitHub ↗
(model)
Source
from the content-addressed store, hash-verified
70
# return sum(counts)
71
72
def
get_layer_param(model):
73
return
sum([reduce(operator.mul, i.size(), 1)
for
i in model.parameters()])
74
75
def
measure_model(model, input_image_size, forward_param=None):
76
flop_counts = []
Callers
1
hook
Function · 0.85
Calls
1
size
Method · 0.80
Tested by
no test coverage detected