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)
| 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) |
no test coverage detected