Common code which compute flops for unary operations.
(graph, node, ops_per_element=1)
| 62 | |
| 63 | |
| 64 | def _unary_op_flops(graph, node, ops_per_element=1): |
| 65 | """Common code which compute flops for unary operations.""" |
| 66 | in_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0]) |
| 67 | in_shape.assert_is_fully_defined() |
| 68 | return ops.OpStats("flops", in_shape.num_elements() * ops_per_element) |
| 69 | |
| 70 | |
| 71 | @ops.RegisterStatistics("Reciprocal", "flops") |
no test coverage detected