FLOPs computation for pool op. For pool(input): equation: flops = (numel)total number of elements in the input tensor.
(input_shapes, attrs)
| 369 | |
| 370 | @register_flops("pool") |
| 371 | def _pool_flops(input_shapes, attrs): |
| 372 | """FLOPs computation for pool op. |
| 373 | For pool(input): |
| 374 | equation: flops = (numel)total number of elements in the input tensor. |
| 375 | """ |
| 376 | input = input_shapes.get('X')[0] |
| 377 | return prod(input) |