1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/list_ops.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | |
10 | EmptyTensorList::EmptyTensorList(const ::tensorflow::Scope& scope, |
11 | ::tensorflow::Input element_shape, |
12 | ::tensorflow::Input max_num_elements, DataType |
13 | element_dtype) { |
14 | if (!scope.ok()) return; |
15 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
16 | if (!scope.ok()) return; |
17 | auto _max_num_elements = ::tensorflow::ops::AsNodeOut(scope, max_num_elements); |
18 | if (!scope.ok()) return; |
19 | ::tensorflow::Node* ret; |
20 | const auto unique_name = scope.GetUniqueNameForOp("EmptyTensorList" ); |
21 | auto builder = ::tensorflow::NodeBuilder(unique_name, "EmptyTensorList" ) |
22 | .Input(_element_shape) |
23 | .Input(_max_num_elements) |
24 | .Attr("element_dtype" , element_dtype) |
25 | ; |
26 | scope.UpdateBuilder(&builder); |
27 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
28 | if (!scope.ok()) return; |
29 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
30 | this->operation = Operation(ret); |
31 | this->handle = Output(ret, 0); |
32 | } |
33 | |
34 | TensorListConcat::TensorListConcat(const ::tensorflow::Scope& scope, |
35 | ::tensorflow::Input input_handle, DataType |
36 | element_dtype, const |
37 | TensorListConcat::Attrs& attrs) { |
38 | if (!scope.ok()) return; |
39 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
40 | if (!scope.ok()) return; |
41 | ::tensorflow::Node* ret; |
42 | const auto unique_name = scope.GetUniqueNameForOp("TensorListConcat" ); |
43 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListConcat" ) |
44 | .Input(_input_handle) |
45 | .Attr("element_dtype" , element_dtype) |
46 | .Attr("element_shape" , attrs.element_shape_) |
47 | ; |
48 | scope.UpdateBuilder(&builder); |
49 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
50 | if (!scope.ok()) return; |
51 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
52 | this->operation = Operation(ret); |
53 | ::tensorflow::NameRangeMap _outputs_range; |
54 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
55 | if (!_status_.ok()) { |
56 | scope.UpdateStatus(_status_); |
57 | return; |
58 | } |
59 | |
60 | this->tensor = Output(ret, _outputs_range["tensor" ].first); |
61 | this->lengths = Output(ret, _outputs_range["lengths" ].first); |
62 | } |
63 | |
64 | TensorListConcat::TensorListConcat(const ::tensorflow::Scope& scope, |
65 | ::tensorflow::Input input_handle, DataType |
66 | element_dtype) |
67 | : TensorListConcat(scope, input_handle, element_dtype, TensorListConcat::Attrs()) {} |
68 | |
69 | TensorListConcatLists::TensorListConcatLists(const ::tensorflow::Scope& scope, |
70 | ::tensorflow::Input input_a, |
71 | ::tensorflow::Input input_b, |
72 | DataType element_dtype) { |
73 | if (!scope.ok()) return; |
74 | auto _input_a = ::tensorflow::ops::AsNodeOut(scope, input_a); |
75 | if (!scope.ok()) return; |
76 | auto _input_b = ::tensorflow::ops::AsNodeOut(scope, input_b); |
77 | if (!scope.ok()) return; |
78 | ::tensorflow::Node* ret; |
79 | const auto unique_name = scope.GetUniqueNameForOp("TensorListConcatLists" ); |
80 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListConcatLists" ) |
81 | .Input(_input_a) |
82 | .Input(_input_b) |
83 | .Attr("element_dtype" , element_dtype) |
84 | ; |
85 | scope.UpdateBuilder(&builder); |
86 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
87 | if (!scope.ok()) return; |
88 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
89 | this->operation = Operation(ret); |
90 | this->output = Output(ret, 0); |
91 | } |
92 | |
93 | TensorListConcatV2::TensorListConcatV2(const ::tensorflow::Scope& scope, |
94 | ::tensorflow::Input input_handle, |
95 | ::tensorflow::Input element_shape, |
96 | ::tensorflow::Input leading_dims, |
97 | DataType element_dtype) { |
98 | if (!scope.ok()) return; |
99 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
100 | if (!scope.ok()) return; |
101 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
102 | if (!scope.ok()) return; |
103 | auto _leading_dims = ::tensorflow::ops::AsNodeOut(scope, leading_dims); |
104 | if (!scope.ok()) return; |
105 | ::tensorflow::Node* ret; |
106 | const auto unique_name = scope.GetUniqueNameForOp("TensorListConcatV2" ); |
107 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListConcatV2" ) |
108 | .Input(_input_handle) |
109 | .Input(_element_shape) |
110 | .Input(_leading_dims) |
111 | .Attr("element_dtype" , element_dtype) |
112 | ; |
113 | scope.UpdateBuilder(&builder); |
114 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
115 | if (!scope.ok()) return; |
116 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
117 | this->operation = Operation(ret); |
118 | ::tensorflow::NameRangeMap _outputs_range; |
119 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
120 | if (!_status_.ok()) { |
121 | scope.UpdateStatus(_status_); |
122 | return; |
123 | } |
124 | |
125 | this->tensor = Output(ret, _outputs_range["tensor" ].first); |
126 | this->lengths = Output(ret, _outputs_range["lengths" ].first); |
127 | } |
128 | |
129 | TensorListElementShape::TensorListElementShape(const ::tensorflow::Scope& |
130 | scope, ::tensorflow::Input |
131 | input_handle, DataType |
132 | shape_type) { |
133 | if (!scope.ok()) return; |
134 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
135 | if (!scope.ok()) return; |
136 | ::tensorflow::Node* ret; |
137 | const auto unique_name = scope.GetUniqueNameForOp("TensorListElementShape" ); |
138 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListElementShape" ) |
139 | .Input(_input_handle) |
140 | .Attr("shape_type" , shape_type) |
141 | ; |
142 | scope.UpdateBuilder(&builder); |
143 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
144 | if (!scope.ok()) return; |
145 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
146 | this->operation = Operation(ret); |
147 | this->element_shape = Output(ret, 0); |
148 | } |
149 | |
150 | TensorListFromTensor::TensorListFromTensor(const ::tensorflow::Scope& scope, |
151 | ::tensorflow::Input tensor, |
152 | ::tensorflow::Input element_shape) { |
153 | if (!scope.ok()) return; |
154 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
155 | if (!scope.ok()) return; |
156 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
157 | if (!scope.ok()) return; |
158 | ::tensorflow::Node* ret; |
159 | const auto unique_name = scope.GetUniqueNameForOp("TensorListFromTensor" ); |
160 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListFromTensor" ) |
161 | .Input(_tensor) |
162 | .Input(_element_shape) |
163 | ; |
164 | scope.UpdateBuilder(&builder); |
165 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
166 | if (!scope.ok()) return; |
167 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
168 | this->operation = Operation(ret); |
169 | this->output_handle = Output(ret, 0); |
170 | } |
171 | |
172 | TensorListGather::TensorListGather(const ::tensorflow::Scope& scope, |
173 | ::tensorflow::Input input_handle, |
174 | ::tensorflow::Input indices, |
175 | ::tensorflow::Input element_shape, DataType |
176 | element_dtype) { |
177 | if (!scope.ok()) return; |
178 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
179 | if (!scope.ok()) return; |
180 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
181 | if (!scope.ok()) return; |
182 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
183 | if (!scope.ok()) return; |
184 | ::tensorflow::Node* ret; |
185 | const auto unique_name = scope.GetUniqueNameForOp("TensorListGather" ); |
186 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListGather" ) |
187 | .Input(_input_handle) |
188 | .Input(_indices) |
189 | .Input(_element_shape) |
190 | .Attr("element_dtype" , element_dtype) |
191 | ; |
192 | scope.UpdateBuilder(&builder); |
193 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
194 | if (!scope.ok()) return; |
195 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
196 | this->operation = Operation(ret); |
197 | this->values = Output(ret, 0); |
198 | } |
199 | |
200 | TensorListGetItem::TensorListGetItem(const ::tensorflow::Scope& scope, |
201 | ::tensorflow::Input input_handle, |
202 | ::tensorflow::Input index, |
203 | ::tensorflow::Input element_shape, |
204 | DataType element_dtype) { |
205 | if (!scope.ok()) return; |
206 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
207 | if (!scope.ok()) return; |
208 | auto _index = ::tensorflow::ops::AsNodeOut(scope, index); |
209 | if (!scope.ok()) return; |
210 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
211 | if (!scope.ok()) return; |
212 | ::tensorflow::Node* ret; |
213 | const auto unique_name = scope.GetUniqueNameForOp("TensorListGetItem" ); |
214 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListGetItem" ) |
215 | .Input(_input_handle) |
216 | .Input(_index) |
217 | .Input(_element_shape) |
218 | .Attr("element_dtype" , element_dtype) |
219 | ; |
220 | scope.UpdateBuilder(&builder); |
221 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
222 | if (!scope.ok()) return; |
223 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
224 | this->operation = Operation(ret); |
225 | this->item = Output(ret, 0); |
226 | } |
227 | |
228 | TensorListLength::TensorListLength(const ::tensorflow::Scope& scope, |
229 | ::tensorflow::Input input_handle) { |
230 | if (!scope.ok()) return; |
231 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
232 | if (!scope.ok()) return; |
233 | ::tensorflow::Node* ret; |
234 | const auto unique_name = scope.GetUniqueNameForOp("TensorListLength" ); |
235 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListLength" ) |
236 | .Input(_input_handle) |
237 | ; |
238 | scope.UpdateBuilder(&builder); |
239 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
240 | if (!scope.ok()) return; |
241 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
242 | this->operation = Operation(ret); |
243 | this->length = Output(ret, 0); |
244 | } |
245 | |
246 | TensorListPopBack::TensorListPopBack(const ::tensorflow::Scope& scope, |
247 | ::tensorflow::Input input_handle, |
248 | ::tensorflow::Input element_shape, |
249 | DataType element_dtype) { |
250 | if (!scope.ok()) return; |
251 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
252 | if (!scope.ok()) return; |
253 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
254 | if (!scope.ok()) return; |
255 | ::tensorflow::Node* ret; |
256 | const auto unique_name = scope.GetUniqueNameForOp("TensorListPopBack" ); |
257 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListPopBack" ) |
258 | .Input(_input_handle) |
259 | .Input(_element_shape) |
260 | .Attr("element_dtype" , element_dtype) |
261 | ; |
262 | scope.UpdateBuilder(&builder); |
263 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
264 | if (!scope.ok()) return; |
265 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
266 | this->operation = Operation(ret); |
267 | ::tensorflow::NameRangeMap _outputs_range; |
268 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
269 | if (!_status_.ok()) { |
270 | scope.UpdateStatus(_status_); |
271 | return; |
272 | } |
273 | |
274 | this->output_handle = Output(ret, _outputs_range["output_handle" ].first); |
275 | this->tensor = Output(ret, _outputs_range["tensor" ].first); |
276 | } |
277 | |
278 | TensorListPushBack::TensorListPushBack(const ::tensorflow::Scope& scope, |
279 | ::tensorflow::Input input_handle, |
280 | ::tensorflow::Input tensor) { |
281 | if (!scope.ok()) return; |
282 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
283 | if (!scope.ok()) return; |
284 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
285 | if (!scope.ok()) return; |
286 | ::tensorflow::Node* ret; |
287 | const auto unique_name = scope.GetUniqueNameForOp("TensorListPushBack" ); |
288 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListPushBack" ) |
289 | .Input(_input_handle) |
290 | .Input(_tensor) |
291 | ; |
292 | scope.UpdateBuilder(&builder); |
293 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
294 | if (!scope.ok()) return; |
295 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
296 | this->operation = Operation(ret); |
297 | this->output_handle = Output(ret, 0); |
298 | } |
299 | |
300 | TensorListPushBackBatch::TensorListPushBackBatch(const ::tensorflow::Scope& |
301 | scope, ::tensorflow::Input |
302 | input_handles, |
303 | ::tensorflow::Input tensor) { |
304 | if (!scope.ok()) return; |
305 | auto _input_handles = ::tensorflow::ops::AsNodeOut(scope, input_handles); |
306 | if (!scope.ok()) return; |
307 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
308 | if (!scope.ok()) return; |
309 | ::tensorflow::Node* ret; |
310 | const auto unique_name = scope.GetUniqueNameForOp("TensorListPushBackBatch" ); |
311 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListPushBackBatch" ) |
312 | .Input(_input_handles) |
313 | .Input(_tensor) |
314 | ; |
315 | scope.UpdateBuilder(&builder); |
316 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
317 | if (!scope.ok()) return; |
318 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
319 | this->operation = Operation(ret); |
320 | this->output_handles = Output(ret, 0); |
321 | } |
322 | |
323 | TensorListReserve::TensorListReserve(const ::tensorflow::Scope& scope, |
324 | ::tensorflow::Input element_shape, |
325 | ::tensorflow::Input num_elements, DataType |
326 | element_dtype) { |
327 | if (!scope.ok()) return; |
328 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
329 | if (!scope.ok()) return; |
330 | auto _num_elements = ::tensorflow::ops::AsNodeOut(scope, num_elements); |
331 | if (!scope.ok()) return; |
332 | ::tensorflow::Node* ret; |
333 | const auto unique_name = scope.GetUniqueNameForOp("TensorListReserve" ); |
334 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListReserve" ) |
335 | .Input(_element_shape) |
336 | .Input(_num_elements) |
337 | .Attr("element_dtype" , element_dtype) |
338 | ; |
339 | scope.UpdateBuilder(&builder); |
340 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
341 | if (!scope.ok()) return; |
342 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
343 | this->operation = Operation(ret); |
344 | this->handle = Output(ret, 0); |
345 | } |
346 | |
347 | TensorListResize::TensorListResize(const ::tensorflow::Scope& scope, |
348 | ::tensorflow::Input input_handle, |
349 | ::tensorflow::Input size) { |
350 | if (!scope.ok()) return; |
351 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
352 | if (!scope.ok()) return; |
353 | auto _size = ::tensorflow::ops::AsNodeOut(scope, size); |
354 | if (!scope.ok()) return; |
355 | ::tensorflow::Node* ret; |
356 | const auto unique_name = scope.GetUniqueNameForOp("TensorListResize" ); |
357 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListResize" ) |
358 | .Input(_input_handle) |
359 | .Input(_size) |
360 | ; |
361 | scope.UpdateBuilder(&builder); |
362 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
363 | if (!scope.ok()) return; |
364 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
365 | this->operation = Operation(ret); |
366 | this->output_handle = Output(ret, 0); |
367 | } |
368 | |
369 | TensorListScatter::TensorListScatter(const ::tensorflow::Scope& scope, |
370 | ::tensorflow::Input tensor, |
371 | ::tensorflow::Input indices, |
372 | ::tensorflow::Input element_shape) { |
373 | if (!scope.ok()) return; |
374 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
375 | if (!scope.ok()) return; |
376 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
377 | if (!scope.ok()) return; |
378 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
379 | if (!scope.ok()) return; |
380 | ::tensorflow::Node* ret; |
381 | const auto unique_name = scope.GetUniqueNameForOp("TensorListScatter" ); |
382 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListScatter" ) |
383 | .Input(_tensor) |
384 | .Input(_indices) |
385 | .Input(_element_shape) |
386 | ; |
387 | scope.UpdateBuilder(&builder); |
388 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
389 | if (!scope.ok()) return; |
390 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
391 | this->operation = Operation(ret); |
392 | this->output_handle = Output(ret, 0); |
393 | } |
394 | |
395 | TensorListScatterIntoExistingList::TensorListScatterIntoExistingList(const |
396 | ::tensorflow::Scope& |
397 | scope, |
398 | ::tensorflow::Input |
399 | input_handle, |
400 | ::tensorflow::Input |
401 | tensor, |
402 | ::tensorflow::Input |
403 | indices) { |
404 | if (!scope.ok()) return; |
405 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
406 | if (!scope.ok()) return; |
407 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
408 | if (!scope.ok()) return; |
409 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
410 | if (!scope.ok()) return; |
411 | ::tensorflow::Node* ret; |
412 | const auto unique_name = scope.GetUniqueNameForOp("TensorListScatterIntoExistingList" ); |
413 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListScatterIntoExistingList" ) |
414 | .Input(_input_handle) |
415 | .Input(_tensor) |
416 | .Input(_indices) |
417 | ; |
418 | scope.UpdateBuilder(&builder); |
419 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
420 | if (!scope.ok()) return; |
421 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
422 | this->operation = Operation(ret); |
423 | this->output_handle = Output(ret, 0); |
424 | } |
425 | |
426 | TensorListScatterV2::TensorListScatterV2(const ::tensorflow::Scope& scope, |
427 | ::tensorflow::Input tensor, |
428 | ::tensorflow::Input indices, |
429 | ::tensorflow::Input element_shape, |
430 | ::tensorflow::Input num_elements) { |
431 | if (!scope.ok()) return; |
432 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
433 | if (!scope.ok()) return; |
434 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
435 | if (!scope.ok()) return; |
436 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
437 | if (!scope.ok()) return; |
438 | auto _num_elements = ::tensorflow::ops::AsNodeOut(scope, num_elements); |
439 | if (!scope.ok()) return; |
440 | ::tensorflow::Node* ret; |
441 | const auto unique_name = scope.GetUniqueNameForOp("TensorListScatterV2" ); |
442 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListScatterV2" ) |
443 | .Input(_tensor) |
444 | .Input(_indices) |
445 | .Input(_element_shape) |
446 | .Input(_num_elements) |
447 | ; |
448 | scope.UpdateBuilder(&builder); |
449 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
450 | if (!scope.ok()) return; |
451 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
452 | this->operation = Operation(ret); |
453 | this->output_handle = Output(ret, 0); |
454 | } |
455 | |
456 | TensorListSetItem::TensorListSetItem(const ::tensorflow::Scope& scope, |
457 | ::tensorflow::Input input_handle, |
458 | ::tensorflow::Input index, |
459 | ::tensorflow::Input item) { |
460 | if (!scope.ok()) return; |
461 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
462 | if (!scope.ok()) return; |
463 | auto _index = ::tensorflow::ops::AsNodeOut(scope, index); |
464 | if (!scope.ok()) return; |
465 | auto _item = ::tensorflow::ops::AsNodeOut(scope, item); |
466 | if (!scope.ok()) return; |
467 | ::tensorflow::Node* ret; |
468 | const auto unique_name = scope.GetUniqueNameForOp("TensorListSetItem" ); |
469 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListSetItem" ) |
470 | .Input(_input_handle) |
471 | .Input(_index) |
472 | .Input(_item) |
473 | ; |
474 | scope.UpdateBuilder(&builder); |
475 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
476 | if (!scope.ok()) return; |
477 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
478 | this->operation = Operation(ret); |
479 | this->output_handle = Output(ret, 0); |
480 | } |
481 | |
482 | TensorListSplit::TensorListSplit(const ::tensorflow::Scope& scope, |
483 | ::tensorflow::Input tensor, |
484 | ::tensorflow::Input element_shape, |
485 | ::tensorflow::Input lengths) { |
486 | if (!scope.ok()) return; |
487 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
488 | if (!scope.ok()) return; |
489 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
490 | if (!scope.ok()) return; |
491 | auto _lengths = ::tensorflow::ops::AsNodeOut(scope, lengths); |
492 | if (!scope.ok()) return; |
493 | ::tensorflow::Node* ret; |
494 | const auto unique_name = scope.GetUniqueNameForOp("TensorListSplit" ); |
495 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListSplit" ) |
496 | .Input(_tensor) |
497 | .Input(_element_shape) |
498 | .Input(_lengths) |
499 | ; |
500 | scope.UpdateBuilder(&builder); |
501 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
502 | if (!scope.ok()) return; |
503 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
504 | this->operation = Operation(ret); |
505 | this->output_handle = Output(ret, 0); |
506 | } |
507 | |
508 | TensorListStack::TensorListStack(const ::tensorflow::Scope& scope, |
509 | ::tensorflow::Input input_handle, |
510 | ::tensorflow::Input element_shape, DataType |
511 | element_dtype, const TensorListStack::Attrs& |
512 | attrs) { |
513 | if (!scope.ok()) return; |
514 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
515 | if (!scope.ok()) return; |
516 | auto _element_shape = ::tensorflow::ops::AsNodeOut(scope, element_shape); |
517 | if (!scope.ok()) return; |
518 | ::tensorflow::Node* ret; |
519 | const auto unique_name = scope.GetUniqueNameForOp("TensorListStack" ); |
520 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorListStack" ) |
521 | .Input(_input_handle) |
522 | .Input(_element_shape) |
523 | .Attr("element_dtype" , element_dtype) |
524 | .Attr("num_elements" , attrs.num_elements_) |
525 | ; |
526 | scope.UpdateBuilder(&builder); |
527 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
528 | if (!scope.ok()) return; |
529 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
530 | this->operation = Operation(ret); |
531 | this->tensor = Output(ret, 0); |
532 | } |
533 | |
534 | TensorListStack::TensorListStack(const ::tensorflow::Scope& scope, |
535 | ::tensorflow::Input input_handle, |
536 | ::tensorflow::Input element_shape, DataType |
537 | element_dtype) |
538 | : TensorListStack(scope, input_handle, element_shape, element_dtype, TensorListStack::Attrs()) {} |
539 | |
540 | /// @} |
541 | |
542 | } // namespace ops |
543 | } // namespace tensorflow |
544 | |