MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / count_linear

Function count_linear

python/paddle/hapi/static_flops.py:147–152  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

145
146
147def count_linear(op):
148 total_mul = op.inputs("Y")[0].shape()[0]
149 numel = np.prod(op.outputs("Out")[0].shape()[1:])
150 total_ops = total_mul * numel
151 total_ops = abs(total_ops)
152 return total_ops
153
154
155def count_pool2d(op):

Callers 1

_graph_flopsFunction · 0.70

Calls 4

absFunction · 0.50
shapeMethod · 0.45
inputsMethod · 0.45
outputsMethod · 0.45

Tested by

no test coverage detected