1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/data_flow_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10AccumulatorApplyGradient::AccumulatorApplyGradient(const ::tensorflow::Scope&
11 scope, ::tensorflow::Input
12 handle, ::tensorflow::Input
13 local_step,
14 ::tensorflow::Input
15 gradient) {
16 if (!scope.ok()) return;
17 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
18 if (!scope.ok()) return;
19 auto _local_step = ::tensorflow::ops::AsNodeOut(scope, local_step);
20 if (!scope.ok()) return;
21 auto _gradient = ::tensorflow::ops::AsNodeOut(scope, gradient);
22 if (!scope.ok()) return;
23 ::tensorflow::Node* ret;
24 const auto unique_name = scope.GetUniqueNameForOp("AccumulatorApplyGradient");
25 auto builder = ::tensorflow::NodeBuilder(unique_name, "AccumulatorApplyGradient")
26 .Input(_handle)
27 .Input(_local_step)
28 .Input(_gradient)
29 ;
30 scope.UpdateBuilder(&builder);
31 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
32 if (!scope.ok()) return;
33 scope.UpdateStatus(scope.DoShapeInference(ret));
34 this->operation = Operation(ret);
35 return;
36}
37
38AccumulatorNumAccumulated::AccumulatorNumAccumulated(const ::tensorflow::Scope&
39 scope, ::tensorflow::Input
40 handle) {
41 if (!scope.ok()) return;
42 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
43 if (!scope.ok()) return;
44 ::tensorflow::Node* ret;
45 const auto unique_name = scope.GetUniqueNameForOp("AccumulatorNumAccumulated");
46 auto builder = ::tensorflow::NodeBuilder(unique_name, "AccumulatorNumAccumulated")
47 .Input(_handle)
48 ;
49 scope.UpdateBuilder(&builder);
50 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
51 if (!scope.ok()) return;
52 scope.UpdateStatus(scope.DoShapeInference(ret));
53 this->operation = Operation(ret);
54 this->num_accumulated = Output(ret, 0);
55}
56
57AccumulatorSetGlobalStep::AccumulatorSetGlobalStep(const ::tensorflow::Scope&
58 scope, ::tensorflow::Input
59 handle, ::tensorflow::Input
60 new_global_step) {
61 if (!scope.ok()) return;
62 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
63 if (!scope.ok()) return;
64 auto _new_global_step = ::tensorflow::ops::AsNodeOut(scope, new_global_step);
65 if (!scope.ok()) return;
66 ::tensorflow::Node* ret;
67 const auto unique_name = scope.GetUniqueNameForOp("AccumulatorSetGlobalStep");
68 auto builder = ::tensorflow::NodeBuilder(unique_name, "AccumulatorSetGlobalStep")
69 .Input(_handle)
70 .Input(_new_global_step)
71 ;
72 scope.UpdateBuilder(&builder);
73 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
74 if (!scope.ok()) return;
75 scope.UpdateStatus(scope.DoShapeInference(ret));
76 this->operation = Operation(ret);
77 return;
78}
79
80AccumulatorTakeGradient::AccumulatorTakeGradient(const ::tensorflow::Scope&
81 scope, ::tensorflow::Input
82 handle, ::tensorflow::Input
83 num_required, DataType dtype) {
84 if (!scope.ok()) return;
85 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
86 if (!scope.ok()) return;
87 auto _num_required = ::tensorflow::ops::AsNodeOut(scope, num_required);
88 if (!scope.ok()) return;
89 ::tensorflow::Node* ret;
90 const auto unique_name = scope.GetUniqueNameForOp("AccumulatorTakeGradient");
91 auto builder = ::tensorflow::NodeBuilder(unique_name, "AccumulatorTakeGradient")
92 .Input(_handle)
93 .Input(_num_required)
94 .Attr("dtype", dtype)
95 ;
96 scope.UpdateBuilder(&builder);
97 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
98 if (!scope.ok()) return;
99 scope.UpdateStatus(scope.DoShapeInference(ret));
100 this->operation = Operation(ret);
101 this->average = Output(ret, 0);
102}
103
104Barrier::Barrier(const ::tensorflow::Scope& scope, const DataTypeSlice&
105 component_types, const Barrier::Attrs& attrs) {
106 if (!scope.ok()) return;
107 ::tensorflow::Node* ret;
108 const auto unique_name = scope.GetUniqueNameForOp("Barrier");
109 auto builder = ::tensorflow::NodeBuilder(unique_name, "Barrier")
110 .Attr("component_types", component_types)
111 .Attr("shapes", attrs.shapes_)
112 .Attr("capacity", attrs.capacity_)
113 .Attr("container", attrs.container_)
114 .Attr("shared_name", attrs.shared_name_)
115 ;
116 scope.UpdateBuilder(&builder);
117 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
118 if (!scope.ok()) return;
119 scope.UpdateStatus(scope.DoShapeInference(ret));
120 this->operation = Operation(ret);
121 this->handle = Output(ret, 0);
122}
123
124Barrier::Barrier(const ::tensorflow::Scope& scope, const DataTypeSlice&
125 component_types)
126 : Barrier(scope, component_types, Barrier::Attrs()) {}
127
128BarrierClose::BarrierClose(const ::tensorflow::Scope& scope,
129 ::tensorflow::Input handle, const
130 BarrierClose::Attrs& attrs) {
131 if (!scope.ok()) return;
132 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
133 if (!scope.ok()) return;
134 ::tensorflow::Node* ret;
135 const auto unique_name = scope.GetUniqueNameForOp("BarrierClose");
136 auto builder = ::tensorflow::NodeBuilder(unique_name, "BarrierClose")
137 .Input(_handle)
138 .Attr("cancel_pending_enqueues", attrs.cancel_pending_enqueues_)
139 ;
140 scope.UpdateBuilder(&builder);
141 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
142 if (!scope.ok()) return;
143 scope.UpdateStatus(scope.DoShapeInference(ret));
144 this->operation = Operation(ret);
145 return;
146}
147
148BarrierClose::BarrierClose(const ::tensorflow::Scope& scope,
149 ::tensorflow::Input handle)
150 : BarrierClose(scope, handle, BarrierClose::Attrs()) {}
151
152BarrierIncompleteSize::BarrierIncompleteSize(const ::tensorflow::Scope& scope,
153 ::tensorflow::Input handle) {
154 if (!scope.ok()) return;
155 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
156 if (!scope.ok()) return;
157 ::tensorflow::Node* ret;
158 const auto unique_name = scope.GetUniqueNameForOp("BarrierIncompleteSize");
159 auto builder = ::tensorflow::NodeBuilder(unique_name, "BarrierIncompleteSize")
160 .Input(_handle)
161 ;
162 scope.UpdateBuilder(&builder);
163 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
164 if (!scope.ok()) return;
165 scope.UpdateStatus(scope.DoShapeInference(ret));
166 this->operation = Operation(ret);
167 this->size = Output(ret, 0);
168}
169
170BarrierInsertMany::BarrierInsertMany(const ::tensorflow::Scope& scope,
171 ::tensorflow::Input handle,
172 ::tensorflow::Input keys,
173 ::tensorflow::Input values, int64
174 component_index) {
175 if (!scope.ok()) return;
176 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
177 if (!scope.ok()) return;
178 auto _keys = ::tensorflow::ops::AsNodeOut(scope, keys);
179 if (!scope.ok()) return;
180 auto _values = ::tensorflow::ops::AsNodeOut(scope, values);
181 if (!scope.ok()) return;
182 ::tensorflow::Node* ret;
183 const auto unique_name = scope.GetUniqueNameForOp("BarrierInsertMany");
184 auto builder = ::tensorflow::NodeBuilder(unique_name, "BarrierInsertMany")
185 .Input(_handle)
186 .Input(_keys)
187 .Input(_values)
188 .Attr("component_index", component_index)
189 ;
190 scope.UpdateBuilder(&builder);
191 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
192 if (!scope.ok()) return;
193 scope.UpdateStatus(scope.DoShapeInference(ret));
194 this->operation = Operation(ret);
195 return;
196}
197
198BarrierReadySize::BarrierReadySize(const ::tensorflow::Scope& scope,
199 ::tensorflow::Input handle) {
200 if (!scope.ok()) return;
201 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
202 if (!scope.ok()) return;
203 ::tensorflow::Node* ret;
204 const auto unique_name = scope.GetUniqueNameForOp("BarrierReadySize");
205 auto builder = ::tensorflow::NodeBuilder(unique_name, "BarrierReadySize")
206 .Input(_handle)
207 ;
208 scope.UpdateBuilder(&builder);
209 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
210 if (!scope.ok()) return;
211 scope.UpdateStatus(scope.DoShapeInference(ret));
212 this->operation = Operation(ret);
213 this->size = Output(ret, 0);
214}
215
216BarrierTakeMany::BarrierTakeMany(const ::tensorflow::Scope& scope,
217 ::tensorflow::Input handle,
218 ::tensorflow::Input num_elements, const
219 DataTypeSlice& component_types, const
220 BarrierTakeMany::Attrs& attrs) {
221 if (!scope.ok()) return;
222 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
223 if (!scope.ok()) return;
224 auto _num_elements = ::tensorflow::ops::AsNodeOut(scope, num_elements);
225 if (!scope.ok()) return;
226 ::tensorflow::Node* ret;
227 const auto unique_name = scope.GetUniqueNameForOp("BarrierTakeMany");
228 auto builder = ::tensorflow::NodeBuilder(unique_name, "BarrierTakeMany")
229 .Input(_handle)
230 .Input(_num_elements)
231 .Attr("component_types", component_types)
232 .Attr("allow_small_batch", attrs.allow_small_batch_)
233 .Attr("wait_for_incomplete", attrs.wait_for_incomplete_)
234 .Attr("timeout_ms", attrs.timeout_ms_)
235 ;
236 scope.UpdateBuilder(&builder);
237 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
238 if (!scope.ok()) return;
239 scope.UpdateStatus(scope.DoShapeInference(ret));
240 this->operation = Operation(ret);
241 ::tensorflow::NameRangeMap _outputs_range;
242 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
243 if (!_status_.ok()) {
244 scope.UpdateStatus(_status_);
245 return;
246 }
247
248 this->indices = Output(ret, _outputs_range["indices"].first);
249 this->keys = Output(ret, _outputs_range["keys"].first);
250 for (int32 i = _outputs_range["values"].first; i < _outputs_range["values"].second; ++i)
251 this->values.push_back(Output(ret, i));
252}
253
254BarrierTakeMany::BarrierTakeMany(const ::tensorflow::Scope& scope,
255 ::tensorflow::Input handle,
256 ::tensorflow::Input num_elements, const
257 DataTypeSlice& component_types)
258 : BarrierTakeMany(scope, handle, num_elements, component_types, BarrierTakeMany::Attrs()) {}
259
260ConditionalAccumulator::ConditionalAccumulator(const ::tensorflow::Scope&
261 scope, DataType dtype,
262 PartialTensorShape shape, const
263 ConditionalAccumulator::Attrs&
264 attrs) {
265 if (!scope.ok()) return;
266 ::tensorflow::Node* ret;
267 const auto unique_name = scope.GetUniqueNameForOp("ConditionalAccumulator");
268 auto builder = ::tensorflow::NodeBuilder(unique_name, "ConditionalAccumulator")
269 .Attr("dtype", dtype)
270 .Attr("shape", shape)
271 .Attr("container", attrs.container_)
272 .Attr("shared_name", attrs.shared_name_)
273 .Attr("reduction_type", attrs.reduction_type_)
274 ;
275 scope.UpdateBuilder(&builder);
276 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
277 if (!scope.ok()) return;
278 scope.UpdateStatus(scope.DoShapeInference(ret));
279 this->operation = Operation(ret);
280 this->handle = Output(ret, 0);
281}
282
283ConditionalAccumulator::ConditionalAccumulator(const ::tensorflow::Scope&
284 scope, DataType dtype,
285 PartialTensorShape shape)
286 : ConditionalAccumulator(scope, dtype, shape, ConditionalAccumulator::Attrs()) {}
287
288DeleteSessionTensor::DeleteSessionTensor(const ::tensorflow::Scope& scope,
289 ::tensorflow::Input handle) {
290 if (!scope.ok()) return;
291 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
292 if (!scope.ok()) return;
293 ::tensorflow::Node* ret;
294 const auto unique_name = scope.GetUniqueNameForOp("DeleteSessionTensor");
295 auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteSessionTensor")
296 .Input(_handle)
297 ;
298 scope.UpdateBuilder(&builder);
299 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
300 if (!scope.ok()) return;
301 scope.UpdateStatus(scope.DoShapeInference(ret));
302 this->operation = Operation(ret);
303 return;
304}
305
306DynamicPartition::DynamicPartition(const ::tensorflow::Scope& scope,
307 ::tensorflow::Input data,
308 ::tensorflow::Input partitions, int64
309 num_partitions) {
310 if (!scope.ok()) return;
311 auto _data = ::tensorflow::ops::AsNodeOut(scope, data);
312 if (!scope.ok()) return;
313 auto _partitions = ::tensorflow::ops::AsNodeOut(scope, partitions);
314 if (!scope.ok()) return;
315 ::tensorflow::Node* ret;
316 const auto unique_name = scope.GetUniqueNameForOp("DynamicPartition");
317 auto builder = ::tensorflow::NodeBuilder(unique_name, "DynamicPartition")
318 .Input(_data)
319 .Input(_partitions)
320 .Attr("num_partitions", num_partitions)
321 ;
322 scope.UpdateBuilder(&builder);
323 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
324 if (!scope.ok()) return;
325 scope.UpdateStatus(scope.DoShapeInference(ret));
326 this->operation = Operation(ret);
327 for (int32 i = 0; i < ret->num_outputs(); ++i)
328 this->outputs.push_back(Output(ret, i));
329}
330
331DynamicStitch::DynamicStitch(const ::tensorflow::Scope& scope,
332 ::tensorflow::InputList indices,
333 ::tensorflow::InputList data) {
334 if (!scope.ok()) return;
335 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
336 if (!scope.ok()) return;
337 auto _data = ::tensorflow::ops::AsNodeOutList(scope, data);
338 if (!scope.ok()) return;
339 ::tensorflow::Node* ret;
340 const auto unique_name = scope.GetUniqueNameForOp("DynamicStitch");
341 auto builder = ::tensorflow::NodeBuilder(unique_name, "DynamicStitch")
342 .Input(_indices)
343 .Input(_data)
344 ;
345 scope.UpdateBuilder(&builder);
346 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
347 if (!scope.ok()) return;
348 scope.UpdateStatus(scope.DoShapeInference(ret));
349 this->operation = Operation(ret);
350 this->merged = Output(ret, 0);
351}
352
353FIFOQueue::FIFOQueue(const ::tensorflow::Scope& scope, const DataTypeSlice&
354 component_types, const FIFOQueue::Attrs& attrs) {
355 if (!scope.ok()) return;
356 ::tensorflow::Node* ret;
357 const auto unique_name = scope.GetUniqueNameForOp("FIFOQueue");
358 auto builder = ::tensorflow::NodeBuilder(unique_name, "FIFOQueueV2")
359 .Attr("component_types", component_types)
360 .Attr("shapes", attrs.shapes_)
361 .Attr("capacity", attrs.capacity_)
362 .Attr("container", attrs.container_)
363 .Attr("shared_name", attrs.shared_name_)
364 ;
365 scope.UpdateBuilder(&builder);
366 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
367 if (!scope.ok()) return;
368 scope.UpdateStatus(scope.DoShapeInference(ret));
369 this->operation = Operation(ret);
370 this->handle = Output(ret, 0);
371}
372
373FIFOQueue::FIFOQueue(const ::tensorflow::Scope& scope, const DataTypeSlice&
374 component_types)
375 : FIFOQueue(scope, component_types, FIFOQueue::Attrs()) {}
376
377GetSessionHandle::GetSessionHandle(const ::tensorflow::Scope& scope,
378 ::tensorflow::Input value) {
379 if (!scope.ok()) return;
380 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
381 if (!scope.ok()) return;
382 ::tensorflow::Node* ret;
383 const auto unique_name = scope.GetUniqueNameForOp("GetSessionHandle");
384 auto builder = ::tensorflow::NodeBuilder(unique_name, "GetSessionHandle")
385 .Input(_value)
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->handle = Output(ret, 0);
393}
394
395GetSessionHandleV2::GetSessionHandleV2(const ::tensorflow::Scope& scope,
396 ::tensorflow::Input value) {
397 if (!scope.ok()) return;
398 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
399 if (!scope.ok()) return;
400 ::tensorflow::Node* ret;
401 const auto unique_name = scope.GetUniqueNameForOp("GetSessionHandleV2");
402 auto builder = ::tensorflow::NodeBuilder(unique_name, "GetSessionHandleV2")
403 .Input(_value)
404 ;
405 scope.UpdateBuilder(&builder);
406 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
407 if (!scope.ok()) return;
408 scope.UpdateStatus(scope.DoShapeInference(ret));
409 this->operation = Operation(ret);
410 this->handle = Output(ret, 0);
411}
412
413GetSessionTensor::GetSessionTensor(const ::tensorflow::Scope& scope,
414 ::tensorflow::Input handle, DataType dtype) {
415 if (!scope.ok()) return;
416 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
417 if (!scope.ok()) return;
418 ::tensorflow::Node* ret;
419 const auto unique_name = scope.GetUniqueNameForOp("GetSessionTensor");
420 auto builder = ::tensorflow::NodeBuilder(unique_name, "GetSessionTensor")
421 .Input(_handle)
422 .Attr("dtype", dtype)
423 ;
424 scope.UpdateBuilder(&builder);
425 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
426 if (!scope.ok()) return;
427 scope.UpdateStatus(scope.DoShapeInference(ret));
428 this->operation = Operation(ret);
429 this->value = Output(ret, 0);
430}
431
432MapClear::MapClear(const ::tensorflow::Scope& scope, const DataTypeSlice&
433 dtypes, const MapClear::Attrs& attrs) {
434 if (!scope.ok()) return;
435 ::tensorflow::Node* ret;
436 const auto unique_name = scope.GetUniqueNameForOp("MapClear");
437 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapClear")
438 .Attr("capacity", attrs.capacity_)
439 .Attr("memory_limit", attrs.memory_limit_)
440 .Attr("dtypes", dtypes)
441 .Attr("container", attrs.container_)
442 .Attr("shared_name", attrs.shared_name_)
443 ;
444 scope.UpdateBuilder(&builder);
445 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
446 if (!scope.ok()) return;
447 scope.UpdateStatus(scope.DoShapeInference(ret));
448 this->operation = Operation(ret);
449 return;
450}
451
452MapClear::MapClear(const ::tensorflow::Scope& scope, const DataTypeSlice&
453 dtypes)
454 : MapClear(scope, dtypes, MapClear::Attrs()) {}
455
456MapIncompleteSize::MapIncompleteSize(const ::tensorflow::Scope& scope, const
457 DataTypeSlice& dtypes, const
458 MapIncompleteSize::Attrs& attrs) {
459 if (!scope.ok()) return;
460 ::tensorflow::Node* ret;
461 const auto unique_name = scope.GetUniqueNameForOp("MapIncompleteSize");
462 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapIncompleteSize")
463 .Attr("capacity", attrs.capacity_)
464 .Attr("memory_limit", attrs.memory_limit_)
465 .Attr("dtypes", dtypes)
466 .Attr("container", attrs.container_)
467 .Attr("shared_name", attrs.shared_name_)
468 ;
469 scope.UpdateBuilder(&builder);
470 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
471 if (!scope.ok()) return;
472 scope.UpdateStatus(scope.DoShapeInference(ret));
473 this->operation = Operation(ret);
474 this->size = Output(ret, 0);
475}
476
477MapIncompleteSize::MapIncompleteSize(const ::tensorflow::Scope& scope, const
478 DataTypeSlice& dtypes)
479 : MapIncompleteSize(scope, dtypes, MapIncompleteSize::Attrs()) {}
480
481MapPeek::MapPeek(const ::tensorflow::Scope& scope, ::tensorflow::Input key,
482 ::tensorflow::Input indices, const DataTypeSlice& dtypes,
483 const MapPeek::Attrs& attrs) {
484 if (!scope.ok()) return;
485 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
486 if (!scope.ok()) return;
487 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
488 if (!scope.ok()) return;
489 ::tensorflow::Node* ret;
490 const auto unique_name = scope.GetUniqueNameForOp("MapPeek");
491 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapPeek")
492 .Input(_key)
493 .Input(_indices)
494 .Attr("capacity", attrs.capacity_)
495 .Attr("memory_limit", attrs.memory_limit_)
496 .Attr("dtypes", dtypes)
497 .Attr("container", attrs.container_)
498 .Attr("shared_name", attrs.shared_name_)
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 for (int32 i = 0; i < ret->num_outputs(); ++i)
506 this->values.push_back(Output(ret, i));
507}
508
509MapPeek::MapPeek(const ::tensorflow::Scope& scope, ::tensorflow::Input key,
510 ::tensorflow::Input indices, const DataTypeSlice& dtypes)
511 : MapPeek(scope, key, indices, dtypes, MapPeek::Attrs()) {}
512
513MapSize::MapSize(const ::tensorflow::Scope& scope, const DataTypeSlice& dtypes,
514 const MapSize::Attrs& attrs) {
515 if (!scope.ok()) return;
516 ::tensorflow::Node* ret;
517 const auto unique_name = scope.GetUniqueNameForOp("MapSize");
518 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapSize")
519 .Attr("capacity", attrs.capacity_)
520 .Attr("memory_limit", attrs.memory_limit_)
521 .Attr("dtypes", dtypes)
522 .Attr("container", attrs.container_)
523 .Attr("shared_name", attrs.shared_name_)
524 ;
525 scope.UpdateBuilder(&builder);
526 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
527 if (!scope.ok()) return;
528 scope.UpdateStatus(scope.DoShapeInference(ret));
529 this->operation = Operation(ret);
530 this->size = Output(ret, 0);
531}
532
533MapSize::MapSize(const ::tensorflow::Scope& scope, const DataTypeSlice& dtypes)
534 : MapSize(scope, dtypes, MapSize::Attrs()) {}
535
536MapStage::MapStage(const ::tensorflow::Scope& scope, ::tensorflow::Input key,
537 ::tensorflow::Input indices, ::tensorflow::InputList values,
538 const DataTypeSlice& dtypes, const MapStage::Attrs& attrs) {
539 if (!scope.ok()) return;
540 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
541 if (!scope.ok()) return;
542 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
543 if (!scope.ok()) return;
544 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
545 if (!scope.ok()) return;
546 ::tensorflow::Node* ret;
547 const auto unique_name = scope.GetUniqueNameForOp("MapStage");
548 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapStage")
549 .Input(_key)
550 .Input(_indices)
551 .Input(_values)
552 .Attr("capacity", attrs.capacity_)
553 .Attr("memory_limit", attrs.memory_limit_)
554 .Attr("dtypes", dtypes)
555 .Attr("container", attrs.container_)
556 .Attr("shared_name", attrs.shared_name_)
557 ;
558 scope.UpdateBuilder(&builder);
559 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
560 if (!scope.ok()) return;
561 scope.UpdateStatus(scope.DoShapeInference(ret));
562 this->operation = Operation(ret);
563 return;
564}
565
566MapStage::MapStage(const ::tensorflow::Scope& scope, ::tensorflow::Input key,
567 ::tensorflow::Input indices, ::tensorflow::InputList values,
568 const DataTypeSlice& dtypes)
569 : MapStage(scope, key, indices, values, dtypes, MapStage::Attrs()) {}
570
571MapUnstage::MapUnstage(const ::tensorflow::Scope& scope, ::tensorflow::Input
572 key, ::tensorflow::Input indices, const DataTypeSlice&
573 dtypes, const MapUnstage::Attrs& attrs) {
574 if (!scope.ok()) return;
575 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
576 if (!scope.ok()) return;
577 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
578 if (!scope.ok()) return;
579 ::tensorflow::Node* ret;
580 const auto unique_name = scope.GetUniqueNameForOp("MapUnstage");
581 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapUnstage")
582 .Input(_key)
583 .Input(_indices)
584 .Attr("capacity", attrs.capacity_)
585 .Attr("memory_limit", attrs.memory_limit_)
586 .Attr("dtypes", dtypes)
587 .Attr("container", attrs.container_)
588 .Attr("shared_name", attrs.shared_name_)
589 ;
590 scope.UpdateBuilder(&builder);
591 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
592 if (!scope.ok()) return;
593 scope.UpdateStatus(scope.DoShapeInference(ret));
594 this->operation = Operation(ret);
595 for (int32 i = 0; i < ret->num_outputs(); ++i)
596 this->values.push_back(Output(ret, i));
597}
598
599MapUnstage::MapUnstage(const ::tensorflow::Scope& scope, ::tensorflow::Input
600 key, ::tensorflow::Input indices, const DataTypeSlice&
601 dtypes)
602 : MapUnstage(scope, key, indices, dtypes, MapUnstage::Attrs()) {}
603
604MapUnstageNoKey::MapUnstageNoKey(const ::tensorflow::Scope& scope,
605 ::tensorflow::Input indices, const
606 DataTypeSlice& dtypes, const
607 MapUnstageNoKey::Attrs& attrs) {
608 if (!scope.ok()) return;
609 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
610 if (!scope.ok()) return;
611 ::tensorflow::Node* ret;
612 const auto unique_name = scope.GetUniqueNameForOp("MapUnstageNoKey");
613 auto builder = ::tensorflow::NodeBuilder(unique_name, "MapUnstageNoKey")
614 .Input(_indices)
615 .Attr("capacity", attrs.capacity_)
616 .Attr("memory_limit", attrs.memory_limit_)
617 .Attr("dtypes", dtypes)
618 .Attr("container", attrs.container_)
619 .Attr("shared_name", attrs.shared_name_)
620 ;
621 scope.UpdateBuilder(&builder);
622 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
623 if (!scope.ok()) return;
624 scope.UpdateStatus(scope.DoShapeInference(ret));
625 this->operation = Operation(ret);
626 ::tensorflow::NameRangeMap _outputs_range;
627 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
628 if (!_status_.ok()) {
629 scope.UpdateStatus(_status_);
630 return;
631 }
632
633 this->key = Output(ret, _outputs_range["key"].first);
634 for (int32 i = _outputs_range["values"].first; i < _outputs_range["values"].second; ++i)
635 this->values.push_back(Output(ret, i));
636}
637
638MapUnstageNoKey::MapUnstageNoKey(const ::tensorflow::Scope& scope,
639 ::tensorflow::Input indices, const
640 DataTypeSlice& dtypes)
641 : MapUnstageNoKey(scope, indices, dtypes, MapUnstageNoKey::Attrs()) {}
642
643OrderedMapClear::OrderedMapClear(const ::tensorflow::Scope& scope, const
644 DataTypeSlice& dtypes, const
645 OrderedMapClear::Attrs& attrs) {
646 if (!scope.ok()) return;
647 ::tensorflow::Node* ret;
648 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapClear");
649 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapClear")
650 .Attr("capacity", attrs.capacity_)
651 .Attr("memory_limit", attrs.memory_limit_)
652 .Attr("dtypes", dtypes)
653 .Attr("container", attrs.container_)
654 .Attr("shared_name", attrs.shared_name_)
655 ;
656 scope.UpdateBuilder(&builder);
657 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
658 if (!scope.ok()) return;
659 scope.UpdateStatus(scope.DoShapeInference(ret));
660 this->operation = Operation(ret);
661 return;
662}
663
664OrderedMapClear::OrderedMapClear(const ::tensorflow::Scope& scope, const
665 DataTypeSlice& dtypes)
666 : OrderedMapClear(scope, dtypes, OrderedMapClear::Attrs()) {}
667
668OrderedMapIncompleteSize::OrderedMapIncompleteSize(const ::tensorflow::Scope&
669 scope, const DataTypeSlice&
670 dtypes, const
671 OrderedMapIncompleteSize::Attrs&
672 attrs) {
673 if (!scope.ok()) return;
674 ::tensorflow::Node* ret;
675 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapIncompleteSize");
676 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapIncompleteSize")
677 .Attr("capacity", attrs.capacity_)
678 .Attr("memory_limit", attrs.memory_limit_)
679 .Attr("dtypes", dtypes)
680 .Attr("container", attrs.container_)
681 .Attr("shared_name", attrs.shared_name_)
682 ;
683 scope.UpdateBuilder(&builder);
684 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
685 if (!scope.ok()) return;
686 scope.UpdateStatus(scope.DoShapeInference(ret));
687 this->operation = Operation(ret);
688 this->size = Output(ret, 0);
689}
690
691OrderedMapIncompleteSize::OrderedMapIncompleteSize(const ::tensorflow::Scope&
692 scope, const DataTypeSlice&
693 dtypes)
694 : OrderedMapIncompleteSize(scope, dtypes, OrderedMapIncompleteSize::Attrs()) {}
695
696OrderedMapPeek::OrderedMapPeek(const ::tensorflow::Scope& scope,
697 ::tensorflow::Input key, ::tensorflow::Input
698 indices, const DataTypeSlice& dtypes, const
699 OrderedMapPeek::Attrs& attrs) {
700 if (!scope.ok()) return;
701 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
702 if (!scope.ok()) return;
703 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
704 if (!scope.ok()) return;
705 ::tensorflow::Node* ret;
706 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapPeek");
707 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapPeek")
708 .Input(_key)
709 .Input(_indices)
710 .Attr("capacity", attrs.capacity_)
711 .Attr("memory_limit", attrs.memory_limit_)
712 .Attr("dtypes", dtypes)
713 .Attr("container", attrs.container_)
714 .Attr("shared_name", attrs.shared_name_)
715 ;
716 scope.UpdateBuilder(&builder);
717 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
718 if (!scope.ok()) return;
719 scope.UpdateStatus(scope.DoShapeInference(ret));
720 this->operation = Operation(ret);
721 for (int32 i = 0; i < ret->num_outputs(); ++i)
722 this->values.push_back(Output(ret, i));
723}
724
725OrderedMapPeek::OrderedMapPeek(const ::tensorflow::Scope& scope,
726 ::tensorflow::Input key, ::tensorflow::Input
727 indices, const DataTypeSlice& dtypes)
728 : OrderedMapPeek(scope, key, indices, dtypes, OrderedMapPeek::Attrs()) {}
729
730OrderedMapSize::OrderedMapSize(const ::tensorflow::Scope& scope, const
731 DataTypeSlice& dtypes, const
732 OrderedMapSize::Attrs& attrs) {
733 if (!scope.ok()) return;
734 ::tensorflow::Node* ret;
735 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapSize");
736 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapSize")
737 .Attr("capacity", attrs.capacity_)
738 .Attr("memory_limit", attrs.memory_limit_)
739 .Attr("dtypes", dtypes)
740 .Attr("container", attrs.container_)
741 .Attr("shared_name", attrs.shared_name_)
742 ;
743 scope.UpdateBuilder(&builder);
744 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
745 if (!scope.ok()) return;
746 scope.UpdateStatus(scope.DoShapeInference(ret));
747 this->operation = Operation(ret);
748 this->size = Output(ret, 0);
749}
750
751OrderedMapSize::OrderedMapSize(const ::tensorflow::Scope& scope, const
752 DataTypeSlice& dtypes)
753 : OrderedMapSize(scope, dtypes, OrderedMapSize::Attrs()) {}
754
755OrderedMapStage::OrderedMapStage(const ::tensorflow::Scope& scope,
756 ::tensorflow::Input key, ::tensorflow::Input
757 indices, ::tensorflow::InputList values, const
758 DataTypeSlice& dtypes, const
759 OrderedMapStage::Attrs& attrs) {
760 if (!scope.ok()) return;
761 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
762 if (!scope.ok()) return;
763 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
764 if (!scope.ok()) return;
765 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
766 if (!scope.ok()) return;
767 ::tensorflow::Node* ret;
768 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapStage");
769 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapStage")
770 .Input(_key)
771 .Input(_indices)
772 .Input(_values)
773 .Attr("capacity", attrs.capacity_)
774 .Attr("memory_limit", attrs.memory_limit_)
775 .Attr("dtypes", dtypes)
776 .Attr("container", attrs.container_)
777 .Attr("shared_name", attrs.shared_name_)
778 ;
779 scope.UpdateBuilder(&builder);
780 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
781 if (!scope.ok()) return;
782 scope.UpdateStatus(scope.DoShapeInference(ret));
783 this->operation = Operation(ret);
784 return;
785}
786
787OrderedMapStage::OrderedMapStage(const ::tensorflow::Scope& scope,
788 ::tensorflow::Input key, ::tensorflow::Input
789 indices, ::tensorflow::InputList values, const
790 DataTypeSlice& dtypes)
791 : OrderedMapStage(scope, key, indices, values, dtypes, OrderedMapStage::Attrs()) {}
792
793OrderedMapUnstage::OrderedMapUnstage(const ::tensorflow::Scope& scope,
794 ::tensorflow::Input key,
795 ::tensorflow::Input indices, const
796 DataTypeSlice& dtypes, const
797 OrderedMapUnstage::Attrs& attrs) {
798 if (!scope.ok()) return;
799 auto _key = ::tensorflow::ops::AsNodeOut(scope, key);
800 if (!scope.ok()) return;
801 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
802 if (!scope.ok()) return;
803 ::tensorflow::Node* ret;
804 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapUnstage");
805 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapUnstage")
806 .Input(_key)
807 .Input(_indices)
808 .Attr("capacity", attrs.capacity_)
809 .Attr("memory_limit", attrs.memory_limit_)
810 .Attr("dtypes", dtypes)
811 .Attr("container", attrs.container_)
812 .Attr("shared_name", attrs.shared_name_)
813 ;
814 scope.UpdateBuilder(&builder);
815 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
816 if (!scope.ok()) return;
817 scope.UpdateStatus(scope.DoShapeInference(ret));
818 this->operation = Operation(ret);
819 for (int32 i = 0; i < ret->num_outputs(); ++i)
820 this->values.push_back(Output(ret, i));
821}
822
823OrderedMapUnstage::OrderedMapUnstage(const ::tensorflow::Scope& scope,
824 ::tensorflow::Input key,
825 ::tensorflow::Input indices, const
826 DataTypeSlice& dtypes)
827 : OrderedMapUnstage(scope, key, indices, dtypes, OrderedMapUnstage::Attrs()) {}
828
829OrderedMapUnstageNoKey::OrderedMapUnstageNoKey(const ::tensorflow::Scope&
830 scope, ::tensorflow::Input
831 indices, const DataTypeSlice&
832 dtypes, const
833 OrderedMapUnstageNoKey::Attrs&
834 attrs) {
835 if (!scope.ok()) return;
836 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
837 if (!scope.ok()) return;
838 ::tensorflow::Node* ret;
839 const auto unique_name = scope.GetUniqueNameForOp("OrderedMapUnstageNoKey");
840 auto builder = ::tensorflow::NodeBuilder(unique_name, "OrderedMapUnstageNoKey")
841 .Input(_indices)
842 .Attr("capacity", attrs.capacity_)
843 .Attr("memory_limit", attrs.memory_limit_)
844 .Attr("dtypes", dtypes)
845 .Attr("container", attrs.container_)
846 .Attr("shared_name", attrs.shared_name_)
847 ;
848 scope.UpdateBuilder(&builder);
849 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
850 if (!scope.ok()) return;
851 scope.UpdateStatus(scope.DoShapeInference(ret));
852 this->operation = Operation(ret);
853 ::tensorflow::NameRangeMap _outputs_range;
854 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
855 if (!_status_.ok()) {
856 scope.UpdateStatus(_status_);
857 return;
858 }
859
860 this->key = Output(ret, _outputs_range["key"].first);
861 for (int32 i = _outputs_range["values"].first; i < _outputs_range["values"].second; ++i)
862 this->values.push_back(Output(ret, i));
863}
864
865OrderedMapUnstageNoKey::OrderedMapUnstageNoKey(const ::tensorflow::Scope&
866 scope, ::tensorflow::Input
867 indices, const DataTypeSlice&
868 dtypes)
869 : OrderedMapUnstageNoKey(scope, indices, dtypes, OrderedMapUnstageNoKey::Attrs()) {}
870
871PaddingFIFOQueue::PaddingFIFOQueue(const ::tensorflow::Scope& scope, const
872 DataTypeSlice& component_types, const
873 PaddingFIFOQueue::Attrs& attrs) {
874 if (!scope.ok()) return;
875 ::tensorflow::Node* ret;
876 const auto unique_name = scope.GetUniqueNameForOp("PaddingFIFOQueue");
877 auto builder = ::tensorflow::NodeBuilder(unique_name, "PaddingFIFOQueueV2")
878 .Attr("component_types", component_types)
879 .Attr("shapes", attrs.shapes_)
880 .Attr("capacity", attrs.capacity_)
881 .Attr("container", attrs.container_)
882 .Attr("shared_name", attrs.shared_name_)
883 ;
884 scope.UpdateBuilder(&builder);
885 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
886 if (!scope.ok()) return;
887 scope.UpdateStatus(scope.DoShapeInference(ret));
888 this->operation = Operation(ret);
889 this->handle = Output(ret, 0);
890}
891
892PaddingFIFOQueue::PaddingFIFOQueue(const ::tensorflow::Scope& scope, const
893 DataTypeSlice& component_types)
894 : PaddingFIFOQueue(scope, component_types, PaddingFIFOQueue::Attrs()) {}
895
896ParallelDynamicStitch::ParallelDynamicStitch(const ::tensorflow::Scope& scope,
897 ::tensorflow::InputList indices,
898 ::tensorflow::InputList data) {
899 if (!scope.ok()) return;
900 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
901 if (!scope.ok()) return;
902 auto _data = ::tensorflow::ops::AsNodeOutList(scope, data);
903 if (!scope.ok()) return;
904 ::tensorflow::Node* ret;
905 const auto unique_name = scope.GetUniqueNameForOp("ParallelDynamicStitch");
906 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelDynamicStitch")
907 .Input(_indices)
908 .Input(_data)
909 ;
910 scope.UpdateBuilder(&builder);
911 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
912 if (!scope.ok()) return;
913 scope.UpdateStatus(scope.DoShapeInference(ret));
914 this->operation = Operation(ret);
915 this->merged = Output(ret, 0);
916}
917
918PriorityQueue::PriorityQueue(const ::tensorflow::Scope& scope, const
919 gtl::ArraySlice<PartialTensorShape>& shapes, const
920 PriorityQueue::Attrs& attrs) {
921 if (!scope.ok()) return;
922 ::tensorflow::Node* ret;
923 const auto unique_name = scope.GetUniqueNameForOp("PriorityQueue");
924 auto builder = ::tensorflow::NodeBuilder(unique_name, "PriorityQueueV2")
925 .Attr("component_types", attrs.component_types_)
926 .Attr("shapes", shapes)
927 .Attr("capacity", attrs.capacity_)
928 .Attr("container", attrs.container_)
929 .Attr("shared_name", attrs.shared_name_)
930 ;
931 scope.UpdateBuilder(&builder);
932 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
933 if (!scope.ok()) return;
934 scope.UpdateStatus(scope.DoShapeInference(ret));
935 this->operation = Operation(ret);
936 this->handle = Output(ret, 0);
937}
938
939PriorityQueue::PriorityQueue(const ::tensorflow::Scope& scope, const
940 gtl::ArraySlice<PartialTensorShape>& shapes)
941 : PriorityQueue(scope, shapes, PriorityQueue::Attrs()) {}
942
943QueueClose::QueueClose(const ::tensorflow::Scope& scope, ::tensorflow::Input
944 handle, const QueueClose::Attrs& attrs) {
945 if (!scope.ok()) return;
946 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
947 if (!scope.ok()) return;
948 ::tensorflow::Node* ret;
949 const auto unique_name = scope.GetUniqueNameForOp("QueueClose");
950 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueCloseV2")
951 .Input(_handle)
952 .Attr("cancel_pending_enqueues", attrs.cancel_pending_enqueues_)
953 ;
954 scope.UpdateBuilder(&builder);
955 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
956 if (!scope.ok()) return;
957 scope.UpdateStatus(scope.DoShapeInference(ret));
958 this->operation = Operation(ret);
959 return;
960}
961
962QueueClose::QueueClose(const ::tensorflow::Scope& scope, ::tensorflow::Input
963 handle)
964 : QueueClose(scope, handle, QueueClose::Attrs()) {}
965
966QueueDequeueMany::QueueDequeueMany(const ::tensorflow::Scope& scope,
967 ::tensorflow::Input handle,
968 ::tensorflow::Input n, const DataTypeSlice&
969 component_types, const
970 QueueDequeueMany::Attrs& attrs) {
971 if (!scope.ok()) return;
972 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
973 if (!scope.ok()) return;
974 auto _n = ::tensorflow::ops::AsNodeOut(scope, n);
975 if (!scope.ok()) return;
976 ::tensorflow::Node* ret;
977 const auto unique_name = scope.GetUniqueNameForOp("QueueDequeueMany");
978 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueDequeueManyV2")
979 .Input(_handle)
980 .Input(_n)
981 .Attr("component_types", component_types)
982 .Attr("timeout_ms", attrs.timeout_ms_)
983 ;
984 scope.UpdateBuilder(&builder);
985 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
986 if (!scope.ok()) return;
987 scope.UpdateStatus(scope.DoShapeInference(ret));
988 this->operation = Operation(ret);
989 for (int32 i = 0; i < ret->num_outputs(); ++i)
990 this->components.push_back(Output(ret, i));
991}
992
993QueueDequeueMany::QueueDequeueMany(const ::tensorflow::Scope& scope,
994 ::tensorflow::Input handle,
995 ::tensorflow::Input n, const DataTypeSlice&
996 component_types)
997 : QueueDequeueMany(scope, handle, n, component_types, QueueDequeueMany::Attrs()) {}
998
999QueueDequeueUpTo::QueueDequeueUpTo(const ::tensorflow::Scope& scope,
1000 ::tensorflow::Input handle,
1001 ::tensorflow::Input n, const DataTypeSlice&
1002 component_types, const
1003 QueueDequeueUpTo::Attrs& attrs) {
1004 if (!scope.ok()) return;
1005 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1006 if (!scope.ok()) return;
1007 auto _n = ::tensorflow::ops::AsNodeOut(scope, n);
1008 if (!scope.ok()) return;
1009 ::tensorflow::Node* ret;
1010 const auto unique_name = scope.GetUniqueNameForOp("QueueDequeueUpTo");
1011 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueDequeueUpToV2")
1012 .Input(_handle)
1013 .Input(_n)
1014 .Attr("component_types", component_types)
1015 .Attr("timeout_ms", attrs.timeout_ms_)
1016 ;
1017 scope.UpdateBuilder(&builder);
1018 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1019 if (!scope.ok()) return;
1020 scope.UpdateStatus(scope.DoShapeInference(ret));
1021 this->operation = Operation(ret);
1022 for (int32 i = 0; i < ret->num_outputs(); ++i)
1023 this->components.push_back(Output(ret, i));
1024}
1025
1026QueueDequeueUpTo::QueueDequeueUpTo(const ::tensorflow::Scope& scope,
1027 ::tensorflow::Input handle,
1028 ::tensorflow::Input n, const DataTypeSlice&
1029 component_types)
1030 : QueueDequeueUpTo(scope, handle, n, component_types, QueueDequeueUpTo::Attrs()) {}
1031
1032QueueDequeue::QueueDequeue(const ::tensorflow::Scope& scope,
1033 ::tensorflow::Input handle, const DataTypeSlice&
1034 component_types, const QueueDequeue::Attrs& attrs) {
1035 if (!scope.ok()) return;
1036 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1037 if (!scope.ok()) return;
1038 ::tensorflow::Node* ret;
1039 const auto unique_name = scope.GetUniqueNameForOp("QueueDequeue");
1040 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueDequeueV2")
1041 .Input(_handle)
1042 .Attr("component_types", component_types)
1043 .Attr("timeout_ms", attrs.timeout_ms_)
1044 ;
1045 scope.UpdateBuilder(&builder);
1046 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1047 if (!scope.ok()) return;
1048 scope.UpdateStatus(scope.DoShapeInference(ret));
1049 this->operation = Operation(ret);
1050 for (int32 i = 0; i < ret->num_outputs(); ++i)
1051 this->components.push_back(Output(ret, i));
1052}
1053
1054QueueDequeue::QueueDequeue(const ::tensorflow::Scope& scope,
1055 ::tensorflow::Input handle, const DataTypeSlice&
1056 component_types)
1057 : QueueDequeue(scope, handle, component_types, QueueDequeue::Attrs()) {}
1058
1059QueueEnqueueMany::QueueEnqueueMany(const ::tensorflow::Scope& scope,
1060 ::tensorflow::Input handle,
1061 ::tensorflow::InputList components, const
1062 QueueEnqueueMany::Attrs& attrs) {
1063 if (!scope.ok()) return;
1064 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1065 if (!scope.ok()) return;
1066 auto _components = ::tensorflow::ops::AsNodeOutList(scope, components);
1067 if (!scope.ok()) return;
1068 ::tensorflow::Node* ret;
1069 const auto unique_name = scope.GetUniqueNameForOp("QueueEnqueueMany");
1070 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueEnqueueManyV2")
1071 .Input(_handle)
1072 .Input(_components)
1073 .Attr("timeout_ms", attrs.timeout_ms_)
1074 ;
1075 scope.UpdateBuilder(&builder);
1076 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1077 if (!scope.ok()) return;
1078 scope.UpdateStatus(scope.DoShapeInference(ret));
1079 this->operation = Operation(ret);
1080 return;
1081}
1082
1083QueueEnqueueMany::QueueEnqueueMany(const ::tensorflow::Scope& scope,
1084 ::tensorflow::Input handle,
1085 ::tensorflow::InputList components)
1086 : QueueEnqueueMany(scope, handle, components, QueueEnqueueMany::Attrs()) {}
1087
1088QueueEnqueue::QueueEnqueue(const ::tensorflow::Scope& scope,
1089 ::tensorflow::Input handle, ::tensorflow::InputList
1090 components, const QueueEnqueue::Attrs& attrs) {
1091 if (!scope.ok()) return;
1092 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1093 if (!scope.ok()) return;
1094 auto _components = ::tensorflow::ops::AsNodeOutList(scope, components);
1095 if (!scope.ok()) return;
1096 ::tensorflow::Node* ret;
1097 const auto unique_name = scope.GetUniqueNameForOp("QueueEnqueue");
1098 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueEnqueueV2")
1099 .Input(_handle)
1100 .Input(_components)
1101 .Attr("timeout_ms", attrs.timeout_ms_)
1102 ;
1103 scope.UpdateBuilder(&builder);
1104 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1105 if (!scope.ok()) return;
1106 scope.UpdateStatus(scope.DoShapeInference(ret));
1107 this->operation = Operation(ret);
1108 return;
1109}
1110
1111QueueEnqueue::QueueEnqueue(const ::tensorflow::Scope& scope,
1112 ::tensorflow::Input handle, ::tensorflow::InputList
1113 components)
1114 : QueueEnqueue(scope, handle, components, QueueEnqueue::Attrs()) {}
1115
1116QueueIsClosed::QueueIsClosed(const ::tensorflow::Scope& scope,
1117 ::tensorflow::Input handle) {
1118 if (!scope.ok()) return;
1119 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1120 if (!scope.ok()) return;
1121 ::tensorflow::Node* ret;
1122 const auto unique_name = scope.GetUniqueNameForOp("QueueIsClosed");
1123 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueIsClosed")
1124 .Input(_handle)
1125 ;
1126 scope.UpdateBuilder(&builder);
1127 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1128 if (!scope.ok()) return;
1129 scope.UpdateStatus(scope.DoShapeInference(ret));
1130 this->operation = Operation(ret);
1131 this->is_closed = Output(ret, 0);
1132}
1133
1134QueueIsClosedV2::QueueIsClosedV2(const ::tensorflow::Scope& scope,
1135 ::tensorflow::Input handle) {
1136 if (!scope.ok()) return;
1137 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1138 if (!scope.ok()) return;
1139 ::tensorflow::Node* ret;
1140 const auto unique_name = scope.GetUniqueNameForOp("QueueIsClosedV2");
1141 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueIsClosedV2")
1142 .Input(_handle)
1143 ;
1144 scope.UpdateBuilder(&builder);
1145 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1146 if (!scope.ok()) return;
1147 scope.UpdateStatus(scope.DoShapeInference(ret));
1148 this->operation = Operation(ret);
1149 this->is_closed = Output(ret, 0);
1150}
1151
1152QueueSize::QueueSize(const ::tensorflow::Scope& scope, ::tensorflow::Input
1153 handle) {
1154 if (!scope.ok()) return;
1155 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1156 if (!scope.ok()) return;
1157 ::tensorflow::Node* ret;
1158 const auto unique_name = scope.GetUniqueNameForOp("QueueSize");
1159 auto builder = ::tensorflow::NodeBuilder(unique_name, "QueueSizeV2")
1160 .Input(_handle)
1161 ;
1162 scope.UpdateBuilder(&builder);
1163 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1164 if (!scope.ok()) return;
1165 scope.UpdateStatus(scope.DoShapeInference(ret));
1166 this->operation = Operation(ret);
1167 this->size = Output(ret, 0);
1168}
1169
1170RandomShuffleQueue::RandomShuffleQueue(const ::tensorflow::Scope& scope, const
1171 DataTypeSlice& component_types, const
1172 RandomShuffleQueue::Attrs& attrs) {
1173 if (!scope.ok()) return;
1174 ::tensorflow::Node* ret;
1175 const auto unique_name = scope.GetUniqueNameForOp("RandomShuffleQueue");
1176 auto builder = ::tensorflow::NodeBuilder(unique_name, "RandomShuffleQueueV2")
1177 .Attr("component_types", component_types)
1178 .Attr("shapes", attrs.shapes_)
1179 .Attr("capacity", attrs.capacity_)
1180 .Attr("min_after_dequeue", attrs.min_after_dequeue_)
1181 .Attr("seed", attrs.seed_)
1182 .Attr("seed2", attrs.seed2_)
1183 .Attr("container", attrs.container_)
1184 .Attr("shared_name", attrs.shared_name_)
1185 ;
1186 scope.UpdateBuilder(&builder);
1187 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1188 if (!scope.ok()) return;
1189 scope.UpdateStatus(scope.DoShapeInference(ret));
1190 this->operation = Operation(ret);
1191 this->handle = Output(ret, 0);
1192}
1193
1194RandomShuffleQueue::RandomShuffleQueue(const ::tensorflow::Scope& scope, const
1195 DataTypeSlice& component_types)
1196 : RandomShuffleQueue(scope, component_types, RandomShuffleQueue::Attrs()) {}
1197
1198RecordInput::RecordInput(const ::tensorflow::Scope& scope, StringPiece
1199 file_pattern, const RecordInput::Attrs& attrs) {
1200 if (!scope.ok()) return;
1201 ::tensorflow::Node* ret;
1202 const auto unique_name = scope.GetUniqueNameForOp("RecordInput");
1203 auto builder = ::tensorflow::NodeBuilder(unique_name, "RecordInput")
1204 .Attr("file_pattern", file_pattern)
1205 .Attr("file_random_seed", attrs.file_random_seed_)
1206 .Attr("file_shuffle_shift_ratio", attrs.file_shuffle_shift_ratio_)
1207 .Attr("file_buffer_size", attrs.file_buffer_size_)
1208 .Attr("file_parallelism", attrs.file_parallelism_)
1209 .Attr("batch_size", attrs.batch_size_)
1210 .Attr("compression_type", attrs.compression_type_)
1211 ;
1212 scope.UpdateBuilder(&builder);
1213 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1214 if (!scope.ok()) return;
1215 scope.UpdateStatus(scope.DoShapeInference(ret));
1216 this->operation = Operation(ret);
1217 this->records = Output(ret, 0);
1218}
1219
1220RecordInput::RecordInput(const ::tensorflow::Scope& scope, StringPiece
1221 file_pattern)
1222 : RecordInput(scope, file_pattern, RecordInput::Attrs()) {}
1223
1224SparseAccumulatorApplyGradient::SparseAccumulatorApplyGradient(const
1225 ::tensorflow::Scope&
1226 scope,
1227 ::tensorflow::Input
1228 handle,
1229 ::tensorflow::Input
1230 local_step,
1231 ::tensorflow::Input
1232 gradient_indices,
1233 ::tensorflow::Input
1234 gradient_values,
1235 ::tensorflow::Input
1236 gradient_shape,
1237 bool
1238 has_known_shape) {
1239 if (!scope.ok()) return;
1240 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1241 if (!scope.ok()) return;
1242 auto _local_step = ::tensorflow::ops::AsNodeOut(scope, local_step);
1243 if (!scope.ok()) return;
1244 auto _gradient_indices = ::tensorflow::ops::AsNodeOut(scope, gradient_indices);
1245 if (!scope.ok()) return;
1246 auto _gradient_values = ::tensorflow::ops::AsNodeOut(scope, gradient_values);
1247 if (!scope.ok()) return;
1248 auto _gradient_shape = ::tensorflow::ops::AsNodeOut(scope, gradient_shape);
1249 if (!scope.ok()) return;
1250 ::tensorflow::Node* ret;
1251 const auto unique_name = scope.GetUniqueNameForOp("SparseAccumulatorApplyGradient");
1252 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseAccumulatorApplyGradient")
1253 .Input(_handle)
1254 .Input(_local_step)
1255 .Input(_gradient_indices)
1256 .Input(_gradient_values)
1257 .Input(_gradient_shape)
1258 .Attr("has_known_shape", has_known_shape)
1259 ;
1260 scope.UpdateBuilder(&builder);
1261 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1262 if (!scope.ok()) return;
1263 scope.UpdateStatus(scope.DoShapeInference(ret));
1264 this->operation = Operation(ret);
1265 return;
1266}
1267
1268SparseAccumulatorTakeGradient::SparseAccumulatorTakeGradient(const
1269 ::tensorflow::Scope&
1270 scope,
1271 ::tensorflow::Input
1272 handle,
1273 ::tensorflow::Input
1274 num_required,
1275 DataType dtype) {
1276 if (!scope.ok()) return;
1277 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1278 if (!scope.ok()) return;
1279 auto _num_required = ::tensorflow::ops::AsNodeOut(scope, num_required);
1280 if (!scope.ok()) return;
1281 ::tensorflow::Node* ret;
1282 const auto unique_name = scope.GetUniqueNameForOp("SparseAccumulatorTakeGradient");
1283 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseAccumulatorTakeGradient")
1284 .Input(_handle)
1285 .Input(_num_required)
1286 .Attr("dtype", dtype)
1287 ;
1288 scope.UpdateBuilder(&builder);
1289 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1290 if (!scope.ok()) return;
1291 scope.UpdateStatus(scope.DoShapeInference(ret));
1292 this->operation = Operation(ret);
1293 ::tensorflow::NameRangeMap _outputs_range;
1294 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1295 if (!_status_.ok()) {
1296 scope.UpdateStatus(_status_);
1297 return;
1298 }
1299
1300 this->indices = Output(ret, _outputs_range["indices"].first);
1301 this->values = Output(ret, _outputs_range["values"].first);
1302 this->shape = Output(ret, _outputs_range["shape"].first);
1303}
1304
1305SparseConditionalAccumulator::SparseConditionalAccumulator(const
1306 ::tensorflow::Scope&
1307 scope, DataType
1308 dtype,
1309 PartialTensorShape
1310 shape, const
1311 SparseConditionalAccumulator::Attrs&
1312 attrs) {
1313 if (!scope.ok()) return;
1314 ::tensorflow::Node* ret;
1315 const auto unique_name = scope.GetUniqueNameForOp("SparseConditionalAccumulator");
1316 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseConditionalAccumulator")
1317 .Attr("dtype", dtype)
1318 .Attr("shape", shape)
1319 .Attr("container", attrs.container_)
1320 .Attr("shared_name", attrs.shared_name_)
1321 .Attr("reduction_type", attrs.reduction_type_)
1322 ;
1323 scope.UpdateBuilder(&builder);
1324 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1325 if (!scope.ok()) return;
1326 scope.UpdateStatus(scope.DoShapeInference(ret));
1327 this->operation = Operation(ret);
1328 this->handle = Output(ret, 0);
1329}
1330
1331SparseConditionalAccumulator::SparseConditionalAccumulator(const
1332 ::tensorflow::Scope&
1333 scope, DataType
1334 dtype,
1335 PartialTensorShape
1336 shape)
1337 : SparseConditionalAccumulator(scope, dtype, shape, SparseConditionalAccumulator::Attrs()) {}
1338
1339Stage::Stage(const ::tensorflow::Scope& scope, ::tensorflow::InputList values,
1340 const Stage::Attrs& attrs) {
1341 if (!scope.ok()) return;
1342 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
1343 if (!scope.ok()) return;
1344 ::tensorflow::Node* ret;
1345 const auto unique_name = scope.GetUniqueNameForOp("Stage");
1346 auto builder = ::tensorflow::NodeBuilder(unique_name, "Stage")
1347 .Input(_values)
1348 .Attr("capacity", attrs.capacity_)
1349 .Attr("memory_limit", attrs.memory_limit_)
1350 .Attr("container", attrs.container_)
1351 .Attr("shared_name", attrs.shared_name_)
1352 ;
1353 scope.UpdateBuilder(&builder);
1354 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1355 if (!scope.ok()) return;
1356 scope.UpdateStatus(scope.DoShapeInference(ret));
1357 this->operation = Operation(ret);
1358 return;
1359}
1360
1361Stage::Stage(const ::tensorflow::Scope& scope, ::tensorflow::InputList values)
1362 : Stage(scope, values, Stage::Attrs()) {}
1363
1364StageClear::StageClear(const ::tensorflow::Scope& scope, const DataTypeSlice&
1365 dtypes, const StageClear::Attrs& attrs) {
1366 if (!scope.ok()) return;
1367 ::tensorflow::Node* ret;
1368 const auto unique_name = scope.GetUniqueNameForOp("StageClear");
1369 auto builder = ::tensorflow::NodeBuilder(unique_name, "StageClear")
1370 .Attr("capacity", attrs.capacity_)
1371 .Attr("memory_limit", attrs.memory_limit_)
1372 .Attr("dtypes", dtypes)
1373 .Attr("container", attrs.container_)
1374 .Attr("shared_name", attrs.shared_name_)
1375 ;
1376 scope.UpdateBuilder(&builder);
1377 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1378 if (!scope.ok()) return;
1379 scope.UpdateStatus(scope.DoShapeInference(ret));
1380 this->operation = Operation(ret);
1381 return;
1382}
1383
1384StageClear::StageClear(const ::tensorflow::Scope& scope, const DataTypeSlice&
1385 dtypes)
1386 : StageClear(scope, dtypes, StageClear::Attrs()) {}
1387
1388StagePeek::StagePeek(const ::tensorflow::Scope& scope, ::tensorflow::Input
1389 index, const DataTypeSlice& dtypes, const
1390 StagePeek::Attrs& attrs) {
1391 if (!scope.ok()) return;
1392 auto _index = ::tensorflow::ops::AsNodeOut(scope, index);
1393 if (!scope.ok()) return;
1394 ::tensorflow::Node* ret;
1395 const auto unique_name = scope.GetUniqueNameForOp("StagePeek");
1396 auto builder = ::tensorflow::NodeBuilder(unique_name, "StagePeek")
1397 .Input(_index)
1398 .Attr("capacity", attrs.capacity_)
1399 .Attr("memory_limit", attrs.memory_limit_)
1400 .Attr("dtypes", dtypes)
1401 .Attr("container", attrs.container_)
1402 .Attr("shared_name", attrs.shared_name_)
1403 ;
1404 scope.UpdateBuilder(&builder);
1405 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1406 if (!scope.ok()) return;
1407 scope.UpdateStatus(scope.DoShapeInference(ret));
1408 this->operation = Operation(ret);
1409 for (int32 i = 0; i < ret->num_outputs(); ++i)
1410 this->values.push_back(Output(ret, i));
1411}
1412
1413StagePeek::StagePeek(const ::tensorflow::Scope& scope, ::tensorflow::Input
1414 index, const DataTypeSlice& dtypes)
1415 : StagePeek(scope, index, dtypes, StagePeek::Attrs()) {}
1416
1417StageSize::StageSize(const ::tensorflow::Scope& scope, const DataTypeSlice&
1418 dtypes, const StageSize::Attrs& attrs) {
1419 if (!scope.ok()) return;
1420 ::tensorflow::Node* ret;
1421 const auto unique_name = scope.GetUniqueNameForOp("StageSize");
1422 auto builder = ::tensorflow::NodeBuilder(unique_name, "StageSize")
1423 .Attr("capacity", attrs.capacity_)
1424 .Attr("memory_limit", attrs.memory_limit_)
1425 .Attr("dtypes", dtypes)
1426 .Attr("container", attrs.container_)
1427 .Attr("shared_name", attrs.shared_name_)
1428 ;
1429 scope.UpdateBuilder(&builder);
1430 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1431 if (!scope.ok()) return;
1432 scope.UpdateStatus(scope.DoShapeInference(ret));
1433 this->operation = Operation(ret);
1434 this->size = Output(ret, 0);
1435}
1436
1437StageSize::StageSize(const ::tensorflow::Scope& scope, const DataTypeSlice&
1438 dtypes)
1439 : StageSize(scope, dtypes, StageSize::Attrs()) {}
1440
1441TensorArrayClose::TensorArrayClose(const ::tensorflow::Scope& scope,
1442 ::tensorflow::Input handle) {
1443 if (!scope.ok()) return;
1444 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1445 if (!scope.ok()) return;
1446 ::tensorflow::Node* ret;
1447 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayClose");
1448 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayCloseV3")
1449 .Input(_handle)
1450 ;
1451 scope.UpdateBuilder(&builder);
1452 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1453 if (!scope.ok()) return;
1454 scope.UpdateStatus(scope.DoShapeInference(ret));
1455 this->operation = Operation(ret);
1456 return;
1457}
1458
1459TensorArrayConcat::TensorArrayConcat(const ::tensorflow::Scope& scope,
1460 ::tensorflow::Input handle,
1461 ::tensorflow::Input flow_in, DataType
1462 dtype, const TensorArrayConcat::Attrs&
1463 attrs) {
1464 if (!scope.ok()) return;
1465 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1466 if (!scope.ok()) return;
1467 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1468 if (!scope.ok()) return;
1469 ::tensorflow::Node* ret;
1470 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayConcat");
1471 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayConcatV3")
1472 .Input(_handle)
1473 .Input(_flow_in)
1474 .Attr("dtype", dtype)
1475 .Attr("element_shape_except0", attrs.element_shape_except0_)
1476 ;
1477 scope.UpdateBuilder(&builder);
1478 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1479 if (!scope.ok()) return;
1480 scope.UpdateStatus(scope.DoShapeInference(ret));
1481 this->operation = Operation(ret);
1482 ::tensorflow::NameRangeMap _outputs_range;
1483 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1484 if (!_status_.ok()) {
1485 scope.UpdateStatus(_status_);
1486 return;
1487 }
1488
1489 this->value = Output(ret, _outputs_range["value"].first);
1490 this->lengths = Output(ret, _outputs_range["lengths"].first);
1491}
1492
1493TensorArrayConcat::TensorArrayConcat(const ::tensorflow::Scope& scope,
1494 ::tensorflow::Input handle,
1495 ::tensorflow::Input flow_in, DataType
1496 dtype)
1497 : TensorArrayConcat(scope, handle, flow_in, dtype, TensorArrayConcat::Attrs()) {}
1498
1499TensorArrayGather::TensorArrayGather(const ::tensorflow::Scope& scope,
1500 ::tensorflow::Input handle,
1501 ::tensorflow::Input indices,
1502 ::tensorflow::Input flow_in, DataType
1503 dtype, const TensorArrayGather::Attrs&
1504 attrs) {
1505 if (!scope.ok()) return;
1506 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1507 if (!scope.ok()) return;
1508 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
1509 if (!scope.ok()) return;
1510 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1511 if (!scope.ok()) return;
1512 ::tensorflow::Node* ret;
1513 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayGather");
1514 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayGatherV3")
1515 .Input(_handle)
1516 .Input(_indices)
1517 .Input(_flow_in)
1518 .Attr("dtype", dtype)
1519 .Attr("element_shape", attrs.element_shape_)
1520 ;
1521 scope.UpdateBuilder(&builder);
1522 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1523 if (!scope.ok()) return;
1524 scope.UpdateStatus(scope.DoShapeInference(ret));
1525 this->operation = Operation(ret);
1526 this->value = Output(ret, 0);
1527}
1528
1529TensorArrayGather::TensorArrayGather(const ::tensorflow::Scope& scope,
1530 ::tensorflow::Input handle,
1531 ::tensorflow::Input indices,
1532 ::tensorflow::Input flow_in, DataType
1533 dtype)
1534 : TensorArrayGather(scope, handle, indices, flow_in, dtype, TensorArrayGather::Attrs()) {}
1535
1536TensorArrayGrad::TensorArrayGrad(const ::tensorflow::Scope& scope,
1537 ::tensorflow::Input handle,
1538 ::tensorflow::Input flow_in, StringPiece
1539 source) {
1540 if (!scope.ok()) return;
1541 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1542 if (!scope.ok()) return;
1543 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1544 if (!scope.ok()) return;
1545 ::tensorflow::Node* ret;
1546 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayGrad");
1547 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayGradV3")
1548 .Input(_handle)
1549 .Input(_flow_in)
1550 .Attr("source", source)
1551 ;
1552 scope.UpdateBuilder(&builder);
1553 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1554 if (!scope.ok()) return;
1555 scope.UpdateStatus(scope.DoShapeInference(ret));
1556 this->operation = Operation(ret);
1557 ::tensorflow::NameRangeMap _outputs_range;
1558 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1559 if (!_status_.ok()) {
1560 scope.UpdateStatus(_status_);
1561 return;
1562 }
1563
1564 this->grad_handle = Output(ret, _outputs_range["grad_handle"].first);
1565 this->flow_out = Output(ret, _outputs_range["flow_out"].first);
1566}
1567
1568TensorArrayGradWithShape::TensorArrayGradWithShape(const ::tensorflow::Scope&
1569 scope, ::tensorflow::Input
1570 handle, ::tensorflow::Input
1571 flow_in, ::tensorflow::Input
1572 shape_to_prepend,
1573 StringPiece source) {
1574 if (!scope.ok()) return;
1575 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1576 if (!scope.ok()) return;
1577 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1578 if (!scope.ok()) return;
1579 auto _shape_to_prepend = ::tensorflow::ops::AsNodeOut(scope, shape_to_prepend);
1580 if (!scope.ok()) return;
1581 ::tensorflow::Node* ret;
1582 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayGradWithShape");
1583 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayGradWithShape")
1584 .Input(_handle)
1585 .Input(_flow_in)
1586 .Input(_shape_to_prepend)
1587 .Attr("source", source)
1588 ;
1589 scope.UpdateBuilder(&builder);
1590 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1591 if (!scope.ok()) return;
1592 scope.UpdateStatus(scope.DoShapeInference(ret));
1593 this->operation = Operation(ret);
1594 ::tensorflow::NameRangeMap _outputs_range;
1595 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1596 if (!_status_.ok()) {
1597 scope.UpdateStatus(_status_);
1598 return;
1599 }
1600
1601 this->grad_handle = Output(ret, _outputs_range["grad_handle"].first);
1602 this->flow_out = Output(ret, _outputs_range["flow_out"].first);
1603}
1604
1605TensorArrayRead::TensorArrayRead(const ::tensorflow::Scope& scope,
1606 ::tensorflow::Input handle,
1607 ::tensorflow::Input index, ::tensorflow::Input
1608 flow_in, DataType dtype) {
1609 if (!scope.ok()) return;
1610 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1611 if (!scope.ok()) return;
1612 auto _index = ::tensorflow::ops::AsNodeOut(scope, index);
1613 if (!scope.ok()) return;
1614 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1615 if (!scope.ok()) return;
1616 ::tensorflow::Node* ret;
1617 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayRead");
1618 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayReadV3")
1619 .Input(_handle)
1620 .Input(_index)
1621 .Input(_flow_in)
1622 .Attr("dtype", dtype)
1623 ;
1624 scope.UpdateBuilder(&builder);
1625 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1626 if (!scope.ok()) return;
1627 scope.UpdateStatus(scope.DoShapeInference(ret));
1628 this->operation = Operation(ret);
1629 this->value = Output(ret, 0);
1630}
1631
1632TensorArrayScatter::TensorArrayScatter(const ::tensorflow::Scope& scope,
1633 ::tensorflow::Input handle,
1634 ::tensorflow::Input indices,
1635 ::tensorflow::Input value,
1636 ::tensorflow::Input flow_in) {
1637 if (!scope.ok()) return;
1638 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1639 if (!scope.ok()) return;
1640 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
1641 if (!scope.ok()) return;
1642 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
1643 if (!scope.ok()) return;
1644 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1645 if (!scope.ok()) return;
1646 ::tensorflow::Node* ret;
1647 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayScatter");
1648 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayScatterV3")
1649 .Input(_handle)
1650 .Input(_indices)
1651 .Input(_value)
1652 .Input(_flow_in)
1653 ;
1654 scope.UpdateBuilder(&builder);
1655 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1656 if (!scope.ok()) return;
1657 scope.UpdateStatus(scope.DoShapeInference(ret));
1658 this->operation = Operation(ret);
1659 this->flow_out = Output(ret, 0);
1660}
1661
1662TensorArraySize::TensorArraySize(const ::tensorflow::Scope& scope,
1663 ::tensorflow::Input handle,
1664 ::tensorflow::Input flow_in) {
1665 if (!scope.ok()) return;
1666 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1667 if (!scope.ok()) return;
1668 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1669 if (!scope.ok()) return;
1670 ::tensorflow::Node* ret;
1671 const auto unique_name = scope.GetUniqueNameForOp("TensorArraySize");
1672 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArraySizeV3")
1673 .Input(_handle)
1674 .Input(_flow_in)
1675 ;
1676 scope.UpdateBuilder(&builder);
1677 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1678 if (!scope.ok()) return;
1679 scope.UpdateStatus(scope.DoShapeInference(ret));
1680 this->operation = Operation(ret);
1681 this->size = Output(ret, 0);
1682}
1683
1684TensorArraySplit::TensorArraySplit(const ::tensorflow::Scope& scope,
1685 ::tensorflow::Input handle,
1686 ::tensorflow::Input value,
1687 ::tensorflow::Input lengths,
1688 ::tensorflow::Input flow_in) {
1689 if (!scope.ok()) return;
1690 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1691 if (!scope.ok()) return;
1692 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
1693 if (!scope.ok()) return;
1694 auto _lengths = ::tensorflow::ops::AsNodeOut(scope, lengths);
1695 if (!scope.ok()) return;
1696 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1697 if (!scope.ok()) return;
1698 ::tensorflow::Node* ret;
1699 const auto unique_name = scope.GetUniqueNameForOp("TensorArraySplit");
1700 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArraySplitV3")
1701 .Input(_handle)
1702 .Input(_value)
1703 .Input(_lengths)
1704 .Input(_flow_in)
1705 ;
1706 scope.UpdateBuilder(&builder);
1707 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1708 if (!scope.ok()) return;
1709 scope.UpdateStatus(scope.DoShapeInference(ret));
1710 this->operation = Operation(ret);
1711 this->flow_out = Output(ret, 0);
1712}
1713
1714TensorArray::TensorArray(const ::tensorflow::Scope& scope, ::tensorflow::Input
1715 size, DataType dtype, const TensorArray::Attrs& attrs) {
1716 if (!scope.ok()) return;
1717 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
1718 if (!scope.ok()) return;
1719 ::tensorflow::Node* ret;
1720 const auto unique_name = scope.GetUniqueNameForOp("TensorArray");
1721 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayV3")
1722 .Input(_size)
1723 .Attr("dtype", dtype)
1724 .Attr("element_shape", attrs.element_shape_)
1725 .Attr("dynamic_size", attrs.dynamic_size_)
1726 .Attr("clear_after_read", attrs.clear_after_read_)
1727 .Attr("identical_element_shapes", attrs.identical_element_shapes_)
1728 .Attr("tensor_array_name", attrs.tensor_array_name_)
1729 ;
1730 scope.UpdateBuilder(&builder);
1731 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1732 if (!scope.ok()) return;
1733 scope.UpdateStatus(scope.DoShapeInference(ret));
1734 this->operation = Operation(ret);
1735 ::tensorflow::NameRangeMap _outputs_range;
1736 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1737 if (!_status_.ok()) {
1738 scope.UpdateStatus(_status_);
1739 return;
1740 }
1741
1742 this->handle = Output(ret, _outputs_range["handle"].first);
1743 this->flow = Output(ret, _outputs_range["flow"].first);
1744}
1745
1746TensorArray::TensorArray(const ::tensorflow::Scope& scope, ::tensorflow::Input
1747 size, DataType dtype)
1748 : TensorArray(scope, size, dtype, TensorArray::Attrs()) {}
1749
1750TensorArrayWrite::TensorArrayWrite(const ::tensorflow::Scope& scope,
1751 ::tensorflow::Input handle,
1752 ::tensorflow::Input index,
1753 ::tensorflow::Input value,
1754 ::tensorflow::Input flow_in) {
1755 if (!scope.ok()) return;
1756 auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle);
1757 if (!scope.ok()) return;
1758 auto _index = ::tensorflow::ops::AsNodeOut(scope, index);
1759 if (!scope.ok()) return;
1760 auto _value = ::tensorflow::ops::AsNodeOut(scope, value);
1761 if (!scope.ok()) return;
1762 auto _flow_in = ::tensorflow::ops::AsNodeOut(scope, flow_in);
1763 if (!scope.ok()) return;
1764 ::tensorflow::Node* ret;
1765 const auto unique_name = scope.GetUniqueNameForOp("TensorArrayWrite");
1766 auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorArrayWriteV3")
1767 .Input(_handle)
1768 .Input(_index)
1769 .Input(_value)
1770 .Input(_flow_in)
1771 ;
1772 scope.UpdateBuilder(&builder);
1773 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1774 if (!scope.ok()) return;
1775 scope.UpdateStatus(scope.DoShapeInference(ret));
1776 this->operation = Operation(ret);
1777 this->flow_out = Output(ret, 0);
1778}
1779
1780Unstage::Unstage(const ::tensorflow::Scope& scope, const DataTypeSlice& dtypes,
1781 const Unstage::Attrs& attrs) {
1782 if (!scope.ok()) return;
1783 ::tensorflow::Node* ret;
1784 const auto unique_name = scope.GetUniqueNameForOp("Unstage");
1785 auto builder = ::tensorflow::NodeBuilder(unique_name, "Unstage")
1786 .Attr("capacity", attrs.capacity_)
1787 .Attr("memory_limit", attrs.memory_limit_)
1788 .Attr("dtypes", dtypes)
1789 .Attr("container", attrs.container_)
1790 .Attr("shared_name", attrs.shared_name_)
1791 ;
1792 scope.UpdateBuilder(&builder);
1793 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1794 if (!scope.ok()) return;
1795 scope.UpdateStatus(scope.DoShapeInference(ret));
1796 this->operation = Operation(ret);
1797 for (int32 i = 0; i < ret->num_outputs(); ++i)
1798 this->values.push_back(Output(ret, i));
1799}
1800
1801Unstage::Unstage(const ::tensorflow::Scope& scope, const DataTypeSlice& dtypes)
1802 : Unstage(scope, dtypes, Unstage::Attrs()) {}
1803
1804/// @}
1805
1806} // namespace ops
1807} // namespace tensorflow
1808