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

Function _get_input_ts

tensorflow/contrib/graph_editor/select.py:81–99  ·  view source on GitHub ↗

Compute the list of unique input tensors of all the op in ops. Args: ops: an object convertible to a list of `tf.Operation`. Returns: The list of unique input tensors of all the op in ops. Raises: TypeError: if ops cannot be converted to a list of `tf.Operation`.

(ops)

Source from the content-addressed store, hash-verified

79
80
81def _get_input_ts(ops):
82 """Compute the list of unique input tensors of all the op in ops.
83
84 Args:
85 ops: an object convertible to a list of `tf.Operation`.
86 Returns:
87 The list of unique input tensors of all the op in ops.
88 Raises:
89 TypeError: if ops cannot be converted to a list of `tf.Operation`.
90 """
91 ops = util.make_list_of_op(ops)
92 ts = []
93 ts_set = set()
94 for op in ops:
95 for t in op.inputs:
96 if t not in ts_set:
97 ts.append(t)
98 ts_set.add(t)
99 return ts
100
101
102def _get_output_ts(ops):

Callers 2

filter_tsFunction · 0.85
compute_boundary_tsFunction · 0.85

Calls 2

appendMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected