Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PaddlePaddle/Paddle
/ count_bn
Function
count_bn
python/paddle/hapi/static_flops.py:140–144 ·
view source on GitHub ↗
(op)
Source
from the content-addressed store, hash-verified
138
139
140
def
count_bn(op):
141
output_numel = np.prod(op.outputs(
"Y"
)[0].shape()[1:])
142
total_ops = 2 * output_numel
143
total_ops = abs(total_ops)
144
return
total_ops
145
146
147
def
count_linear(op):
Callers
1
_graph_flops
Function · 0.70
Calls
3
abs
Function · 0.50
shape
Method · 0.45
outputs
Method · 0.45
Tested by
no test coverage detected