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

Method _add_outputs

tensorflow/python/framework/ops.py:2107–2122  ·  view source on GitHub ↗

Adds new Tensors to self.outputs. Note: this is generally unsafe to use. This is used in certain situations in conjunction with _set_type_list_attr. Arguments: types: list of DTypes shapes: list of TensorShapes

(self, types, shapes)

Source from the content-addressed store, hash-verified

2105 c_api.RemoveAllControlInputs(self._graph._c_graph, self._c_op) # pylint: disable=protected-access
2106
2107 def _add_outputs(self, types, shapes):
2108 """Adds new Tensors to self.outputs.
2109
2110 Note: this is generally unsafe to use. This is used in certain situations in
2111 conjunction with _set_type_list_attr.
2112
2113 Arguments:
2114 types: list of DTypes
2115 shapes: list of TensorShapes
2116 """
2117 assert len(types) == len(shapes)
2118 orig_num_outputs = len(self.outputs)
2119 for i in range(len(types)):
2120 t = Tensor(self, orig_num_outputs + i, types[i])
2121 self._outputs.append(t)
2122 t.set_shape(shapes[i])
2123
2124 def __str__(self):
2125 return str(self.node_def)

Callers 4

_IfGradFunction · 0.80
_CaseGradFunction · 0.80
_WhileGradFunction · 0.80

Calls 4

set_shapeMethod · 0.95
TensorClass · 0.70
rangeFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected