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

Function count_element_op

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

Source from the content-addressed store, hash-verified

166
167
168def count_element_op(op):
169 input_shape = op.inputs("X")[0].shape()
170 total_ops = np.prod(input_shape[1:])
171 total_ops = abs(total_ops)
172 return total_ops
173
174
175def _graph_flops(graph, detail=False):

Callers 1

_graph_flopsFunction · 0.85

Calls 3

absFunction · 0.50
shapeMethod · 0.45
inputsMethod · 0.45

Tested by

no test coverage detected