MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _unary_op_flops

Function _unary_op_flops

tensorflow/python/profiler/internal/flops_registry.py:64–68  ·  view source on GitHub ↗

Common code which compute flops for unary operations.

(graph, node, ops_per_element=1)

Source from the content-addressed store, hash-verified

62
63
64def _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")

Callers 8

_reciprocal_flopsFunction · 0.85
_square_flopsFunction · 0.85
_rsqrt_flopsFunction · 0.85
_log_flopsFunction · 0.85
_neg_flopsFunction · 0.85
_assign_sub_flopsFunction · 0.85
_assign_add_flopsFunction · 0.85
_softmax_flopsFunction · 0.85

Calls 2

num_elementsMethod · 0.45

Tested by

no test coverage detected