1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/dataset_ops_internal.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | namespace internal { |
10 | // NOTE: This namespace has internal TensorFlow details that |
11 | // are not part of TensorFlow's public API. |
12 | |
13 | AnonymousIteratorV2::AnonymousIteratorV2(const ::tensorflow::Scope& scope, |
14 | const DataTypeSlice& output_types, |
15 | const |
16 | gtl::ArraySlice<PartialTensorShape>& |
17 | output_shapes) { |
18 | if (!scope.ok()) return; |
19 | ::tensorflow::Node* ret; |
20 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousIteratorV2" ); |
21 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousIteratorV2" ) |
22 | .Attr("output_types" , output_types) |
23 | .Attr("output_shapes" , output_shapes) |
24 | ; |
25 | scope.UpdateBuilder(&builder); |
26 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
27 | if (!scope.ok()) return; |
28 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
29 | this->operation = Operation(ret); |
30 | ::tensorflow::NameRangeMap _outputs_range; |
31 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
32 | if (!_status_.ok()) { |
33 | scope.UpdateStatus(_status_); |
34 | return; |
35 | } |
36 | |
37 | this->handle = Output(ret, _outputs_range["handle" ].first); |
38 | this->deleter = Output(ret, _outputs_range["deleter" ].first); |
39 | } |
40 | |
41 | AnonymousIteratorV3::AnonymousIteratorV3(const ::tensorflow::Scope& scope, |
42 | const DataTypeSlice& output_types, |
43 | const |
44 | gtl::ArraySlice<PartialTensorShape>& |
45 | output_shapes) { |
46 | if (!scope.ok()) return; |
47 | ::tensorflow::Node* ret; |
48 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousIteratorV3" ); |
49 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousIteratorV3" ) |
50 | .Attr("output_types" , output_types) |
51 | .Attr("output_shapes" , output_shapes) |
52 | ; |
53 | scope.UpdateBuilder(&builder); |
54 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
55 | if (!scope.ok()) return; |
56 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
57 | this->operation = Operation(ret); |
58 | this->handle = Output(ret, 0); |
59 | } |
60 | |
61 | AnonymousMemoryCache::AnonymousMemoryCache(const ::tensorflow::Scope& scope) { |
62 | if (!scope.ok()) return; |
63 | ::tensorflow::Node* ret; |
64 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMemoryCache" ); |
65 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMemoryCache" ) |
66 | ; |
67 | scope.UpdateBuilder(&builder); |
68 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
69 | if (!scope.ok()) return; |
70 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
71 | this->operation = Operation(ret); |
72 | ::tensorflow::NameRangeMap _outputs_range; |
73 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
74 | if (!_status_.ok()) { |
75 | scope.UpdateStatus(_status_); |
76 | return; |
77 | } |
78 | |
79 | this->handle = Output(ret, _outputs_range["handle" ].first); |
80 | this->deleter = Output(ret, _outputs_range["deleter" ].first); |
81 | } |
82 | |
83 | AnonymousMultiDeviceIterator::AnonymousMultiDeviceIterator(const |
84 | ::tensorflow::Scope& |
85 | scope, const |
86 | gtl::ArraySlice<::tensorflow::tstring>& |
87 | devices, const |
88 | DataTypeSlice& |
89 | output_types, const |
90 | gtl::ArraySlice<PartialTensorShape>& |
91 | output_shapes) { |
92 | if (!scope.ok()) return; |
93 | ::tensorflow::Node* ret; |
94 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMultiDeviceIterator" ); |
95 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMultiDeviceIterator" ) |
96 | .Attr("devices" , devices) |
97 | .Attr("output_types" , output_types) |
98 | .Attr("output_shapes" , output_shapes) |
99 | ; |
100 | scope.UpdateBuilder(&builder); |
101 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
102 | if (!scope.ok()) return; |
103 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
104 | this->operation = Operation(ret); |
105 | ::tensorflow::NameRangeMap _outputs_range; |
106 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
107 | if (!_status_.ok()) { |
108 | scope.UpdateStatus(_status_); |
109 | return; |
110 | } |
111 | |
112 | this->handle = Output(ret, _outputs_range["handle" ].first); |
113 | this->deleter = Output(ret, _outputs_range["deleter" ].first); |
114 | } |
115 | |
116 | AnonymousMultiDeviceIteratorV3::AnonymousMultiDeviceIteratorV3(const |
117 | ::tensorflow::Scope& |
118 | scope, const |
119 | gtl::ArraySlice<::tensorflow::tstring>& |
120 | devices, const |
121 | DataTypeSlice& |
122 | output_types, |
123 | const |
124 | gtl::ArraySlice<PartialTensorShape>& |
125 | output_shapes) { |
126 | if (!scope.ok()) return; |
127 | ::tensorflow::Node* ret; |
128 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMultiDeviceIteratorV3" ); |
129 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMultiDeviceIteratorV3" ) |
130 | .Attr("devices" , devices) |
131 | .Attr("output_types" , output_types) |
132 | .Attr("output_shapes" , output_shapes) |
133 | ; |
134 | scope.UpdateBuilder(&builder); |
135 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
136 | if (!scope.ok()) return; |
137 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
138 | this->operation = Operation(ret); |
139 | this->handle = Output(ret, 0); |
140 | } |
141 | |
142 | AnonymousRandomSeedGenerator::AnonymousRandomSeedGenerator(const |
143 | ::tensorflow::Scope& |
144 | scope, |
145 | ::tensorflow::Input |
146 | seed, |
147 | ::tensorflow::Input |
148 | seed2) { |
149 | if (!scope.ok()) return; |
150 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
151 | if (!scope.ok()) return; |
152 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
153 | if (!scope.ok()) return; |
154 | ::tensorflow::Node* ret; |
155 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousRandomSeedGenerator" ); |
156 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousRandomSeedGenerator" ) |
157 | .Input(_seed) |
158 | .Input(_seed2) |
159 | ; |
160 | scope.UpdateBuilder(&builder); |
161 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
162 | if (!scope.ok()) return; |
163 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
164 | this->operation = Operation(ret); |
165 | ::tensorflow::NameRangeMap _outputs_range; |
166 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
167 | if (!_status_.ok()) { |
168 | scope.UpdateStatus(_status_); |
169 | return; |
170 | } |
171 | |
172 | this->handle = Output(ret, _outputs_range["handle" ].first); |
173 | this->deleter = Output(ret, _outputs_range["deleter" ].first); |
174 | } |
175 | |
176 | AnonymousSeedGenerator::AnonymousSeedGenerator(const ::tensorflow::Scope& |
177 | scope, ::tensorflow::Input seed, |
178 | ::tensorflow::Input seed2, |
179 | ::tensorflow::Input reshuffle) { |
180 | if (!scope.ok()) return; |
181 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
182 | if (!scope.ok()) return; |
183 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
184 | if (!scope.ok()) return; |
185 | auto _reshuffle = ::tensorflow::ops::AsNodeOut(scope, reshuffle); |
186 | if (!scope.ok()) return; |
187 | ::tensorflow::Node* ret; |
188 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousSeedGenerator" ); |
189 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousSeedGenerator" ) |
190 | .Input(_seed) |
191 | .Input(_seed2) |
192 | .Input(_reshuffle) |
193 | ; |
194 | scope.UpdateBuilder(&builder); |
195 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
196 | if (!scope.ok()) return; |
197 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
198 | this->operation = Operation(ret); |
199 | ::tensorflow::NameRangeMap _outputs_range; |
200 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
201 | if (!_status_.ok()) { |
202 | scope.UpdateStatus(_status_); |
203 | return; |
204 | } |
205 | |
206 | this->handle = Output(ret, _outputs_range["handle" ].first); |
207 | this->deleter = Output(ret, _outputs_range["deleter" ].first); |
208 | } |
209 | |
210 | BatchDataset::BatchDataset(const ::tensorflow::Scope& scope, |
211 | ::tensorflow::Input input_dataset, |
212 | ::tensorflow::Input batch_size, const DataTypeSlice& |
213 | output_types, const |
214 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
215 | const BatchDataset::Attrs& attrs) { |
216 | if (!scope.ok()) return; |
217 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
218 | if (!scope.ok()) return; |
219 | auto _batch_size = ::tensorflow::ops::AsNodeOut(scope, batch_size); |
220 | if (!scope.ok()) return; |
221 | ::tensorflow::Node* ret; |
222 | const auto unique_name = scope.GetUniqueNameForOp("BatchDataset" ); |
223 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BatchDataset" ) |
224 | .Input(_input_dataset) |
225 | .Input(_batch_size) |
226 | .Attr("output_types" , output_types) |
227 | .Attr("output_shapes" , output_shapes) |
228 | .Attr("metadata" , attrs.metadata_) |
229 | ; |
230 | scope.UpdateBuilder(&builder); |
231 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
232 | if (!scope.ok()) return; |
233 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
234 | this->operation = Operation(ret); |
235 | this->handle = Output(ret, 0); |
236 | } |
237 | |
238 | BatchDataset::BatchDataset(const ::tensorflow::Scope& scope, |
239 | ::tensorflow::Input input_dataset, |
240 | ::tensorflow::Input batch_size, const DataTypeSlice& |
241 | output_types, const |
242 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
243 | : BatchDataset(scope, input_dataset, batch_size, output_types, output_shapes, BatchDataset::Attrs()) {} |
244 | |
245 | BatchDatasetV2::BatchDatasetV2(const ::tensorflow::Scope& scope, |
246 | ::tensorflow::Input input_dataset, |
247 | ::tensorflow::Input batch_size, |
248 | ::tensorflow::Input drop_remainder, const |
249 | DataTypeSlice& output_types, const |
250 | gtl::ArraySlice<PartialTensorShape>& |
251 | output_shapes, const BatchDatasetV2::Attrs& |
252 | attrs) { |
253 | if (!scope.ok()) return; |
254 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
255 | if (!scope.ok()) return; |
256 | auto _batch_size = ::tensorflow::ops::AsNodeOut(scope, batch_size); |
257 | if (!scope.ok()) return; |
258 | auto _drop_remainder = ::tensorflow::ops::AsNodeOut(scope, drop_remainder); |
259 | if (!scope.ok()) return; |
260 | ::tensorflow::Node* ret; |
261 | const auto unique_name = scope.GetUniqueNameForOp("BatchDatasetV2" ); |
262 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BatchDatasetV2" ) |
263 | .Input(_input_dataset) |
264 | .Input(_batch_size) |
265 | .Input(_drop_remainder) |
266 | .Attr("parallel_copy" , attrs.parallel_copy_) |
267 | .Attr("output_types" , output_types) |
268 | .Attr("output_shapes" , output_shapes) |
269 | .Attr("metadata" , attrs.metadata_) |
270 | ; |
271 | scope.UpdateBuilder(&builder); |
272 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
273 | if (!scope.ok()) return; |
274 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
275 | this->operation = Operation(ret); |
276 | this->handle = Output(ret, 0); |
277 | } |
278 | |
279 | BatchDatasetV2::BatchDatasetV2(const ::tensorflow::Scope& scope, |
280 | ::tensorflow::Input input_dataset, |
281 | ::tensorflow::Input batch_size, |
282 | ::tensorflow::Input drop_remainder, const |
283 | DataTypeSlice& output_types, const |
284 | gtl::ArraySlice<PartialTensorShape>& |
285 | output_shapes) |
286 | : BatchDatasetV2(scope, input_dataset, batch_size, drop_remainder, output_types, output_shapes, BatchDatasetV2::Attrs()) {} |
287 | |
288 | CacheDataset::CacheDataset(const ::tensorflow::Scope& scope, |
289 | ::tensorflow::Input input_dataset, |
290 | ::tensorflow::Input filename, const DataTypeSlice& |
291 | output_types, const |
292 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
293 | const CacheDataset::Attrs& attrs) { |
294 | if (!scope.ok()) return; |
295 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
296 | if (!scope.ok()) return; |
297 | auto _filename = ::tensorflow::ops::AsNodeOut(scope, filename); |
298 | if (!scope.ok()) return; |
299 | ::tensorflow::Node* ret; |
300 | const auto unique_name = scope.GetUniqueNameForOp("CacheDataset" ); |
301 | auto builder = ::tensorflow::NodeBuilder(unique_name, "CacheDataset" ) |
302 | .Input(_input_dataset) |
303 | .Input(_filename) |
304 | .Attr("output_types" , output_types) |
305 | .Attr("output_shapes" , output_shapes) |
306 | .Attr("metadata" , attrs.metadata_) |
307 | ; |
308 | scope.UpdateBuilder(&builder); |
309 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
310 | if (!scope.ok()) return; |
311 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
312 | this->operation = Operation(ret); |
313 | this->handle = Output(ret, 0); |
314 | } |
315 | |
316 | CacheDataset::CacheDataset(const ::tensorflow::Scope& scope, |
317 | ::tensorflow::Input input_dataset, |
318 | ::tensorflow::Input filename, const DataTypeSlice& |
319 | output_types, const |
320 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
321 | : CacheDataset(scope, input_dataset, filename, output_types, output_shapes, CacheDataset::Attrs()) {} |
322 | |
323 | CacheDatasetV2::CacheDatasetV2(const ::tensorflow::Scope& scope, |
324 | ::tensorflow::Input input_dataset, |
325 | ::tensorflow::Input filename, |
326 | ::tensorflow::Input cache, const DataTypeSlice& |
327 | output_types, const |
328 | gtl::ArraySlice<PartialTensorShape>& |
329 | output_shapes, const CacheDatasetV2::Attrs& |
330 | attrs) { |
331 | if (!scope.ok()) return; |
332 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
333 | if (!scope.ok()) return; |
334 | auto _filename = ::tensorflow::ops::AsNodeOut(scope, filename); |
335 | if (!scope.ok()) return; |
336 | auto _cache = ::tensorflow::ops::AsNodeOut(scope, cache); |
337 | if (!scope.ok()) return; |
338 | ::tensorflow::Node* ret; |
339 | const auto unique_name = scope.GetUniqueNameForOp("CacheDatasetV2" ); |
340 | auto builder = ::tensorflow::NodeBuilder(unique_name, "CacheDatasetV2" ) |
341 | .Input(_input_dataset) |
342 | .Input(_filename) |
343 | .Input(_cache) |
344 | .Attr("output_types" , output_types) |
345 | .Attr("output_shapes" , output_shapes) |
346 | .Attr("metadata" , attrs.metadata_) |
347 | ; |
348 | scope.UpdateBuilder(&builder); |
349 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
350 | if (!scope.ok()) return; |
351 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
352 | this->operation = Operation(ret); |
353 | this->handle = Output(ret, 0); |
354 | } |
355 | |
356 | CacheDatasetV2::CacheDatasetV2(const ::tensorflow::Scope& scope, |
357 | ::tensorflow::Input input_dataset, |
358 | ::tensorflow::Input filename, |
359 | ::tensorflow::Input cache, const DataTypeSlice& |
360 | output_types, const |
361 | gtl::ArraySlice<PartialTensorShape>& |
362 | output_shapes) |
363 | : CacheDatasetV2(scope, input_dataset, filename, cache, output_types, output_shapes, CacheDatasetV2::Attrs()) {} |
364 | |
365 | ConcatenateDataset::ConcatenateDataset(const ::tensorflow::Scope& scope, |
366 | ::tensorflow::Input input_dataset, |
367 | ::tensorflow::Input another_dataset, |
368 | const DataTypeSlice& output_types, const |
369 | gtl::ArraySlice<PartialTensorShape>& |
370 | output_shapes, const |
371 | ConcatenateDataset::Attrs& attrs) { |
372 | if (!scope.ok()) return; |
373 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
374 | if (!scope.ok()) return; |
375 | auto _another_dataset = ::tensorflow::ops::AsNodeOut(scope, another_dataset); |
376 | if (!scope.ok()) return; |
377 | ::tensorflow::Node* ret; |
378 | const auto unique_name = scope.GetUniqueNameForOp("ConcatenateDataset" ); |
379 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ConcatenateDataset" ) |
380 | .Input(_input_dataset) |
381 | .Input(_another_dataset) |
382 | .Attr("output_types" , output_types) |
383 | .Attr("output_shapes" , output_shapes) |
384 | .Attr("metadata" , attrs.metadata_) |
385 | ; |
386 | scope.UpdateBuilder(&builder); |
387 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
388 | if (!scope.ok()) return; |
389 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
390 | this->operation = Operation(ret); |
391 | this->handle = Output(ret, 0); |
392 | } |
393 | |
394 | ConcatenateDataset::ConcatenateDataset(const ::tensorflow::Scope& scope, |
395 | ::tensorflow::Input input_dataset, |
396 | ::tensorflow::Input another_dataset, |
397 | const DataTypeSlice& output_types, const |
398 | gtl::ArraySlice<PartialTensorShape>& |
399 | output_shapes) |
400 | : ConcatenateDataset(scope, input_dataset, another_dataset, output_types, output_shapes, ConcatenateDataset::Attrs()) {} |
401 | |
402 | DatasetCardinality::DatasetCardinality(const ::tensorflow::Scope& scope, |
403 | ::tensorflow::Input input_dataset) { |
404 | if (!scope.ok()) return; |
405 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
406 | if (!scope.ok()) return; |
407 | ::tensorflow::Node* ret; |
408 | const auto unique_name = scope.GetUniqueNameForOp("DatasetCardinality" ); |
409 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DatasetCardinality" ) |
410 | .Input(_input_dataset) |
411 | ; |
412 | scope.UpdateBuilder(&builder); |
413 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
414 | if (!scope.ok()) return; |
415 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
416 | this->operation = Operation(ret); |
417 | this->cardinality = Output(ret, 0); |
418 | } |
419 | |
420 | DatasetToGraph::DatasetToGraph(const ::tensorflow::Scope& scope, |
421 | ::tensorflow::Input input_dataset, const |
422 | DatasetToGraph::Attrs& attrs) { |
423 | if (!scope.ok()) return; |
424 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
425 | if (!scope.ok()) return; |
426 | ::tensorflow::Node* ret; |
427 | const auto unique_name = scope.GetUniqueNameForOp("DatasetToGraph" ); |
428 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DatasetToGraph" ) |
429 | .Input(_input_dataset) |
430 | .Attr("stateful_whitelist" , attrs.stateful_whitelist_) |
431 | .Attr("allow_stateful" , attrs.allow_stateful_) |
432 | .Attr("strip_device_assignment" , attrs.strip_device_assignment_) |
433 | ; |
434 | scope.UpdateBuilder(&builder); |
435 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
436 | if (!scope.ok()) return; |
437 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
438 | this->operation = Operation(ret); |
439 | this->graph = Output(ret, 0); |
440 | } |
441 | |
442 | DatasetToGraph::DatasetToGraph(const ::tensorflow::Scope& scope, |
443 | ::tensorflow::Input input_dataset) |
444 | : DatasetToGraph(scope, input_dataset, DatasetToGraph::Attrs()) {} |
445 | |
446 | DatasetToGraphV2::DatasetToGraphV2(const ::tensorflow::Scope& scope, |
447 | ::tensorflow::Input input_dataset, const |
448 | DatasetToGraphV2::Attrs& attrs) { |
449 | if (!scope.ok()) return; |
450 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
451 | if (!scope.ok()) return; |
452 | ::tensorflow::Node* ret; |
453 | const auto unique_name = scope.GetUniqueNameForOp("DatasetToGraphV2" ); |
454 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DatasetToGraphV2" ) |
455 | .Input(_input_dataset) |
456 | .Attr("external_state_policy" , attrs.external_state_policy_) |
457 | .Attr("strip_device_assignment" , attrs.strip_device_assignment_) |
458 | ; |
459 | scope.UpdateBuilder(&builder); |
460 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
461 | if (!scope.ok()) return; |
462 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
463 | this->operation = Operation(ret); |
464 | this->graph = Output(ret, 0); |
465 | } |
466 | |
467 | DatasetToGraphV2::DatasetToGraphV2(const ::tensorflow::Scope& scope, |
468 | ::tensorflow::Input input_dataset) |
469 | : DatasetToGraphV2(scope, input_dataset, DatasetToGraphV2::Attrs()) {} |
470 | |
471 | DatasetToSingleElement::DatasetToSingleElement(const ::tensorflow::Scope& |
472 | scope, ::tensorflow::Input |
473 | dataset, const DataTypeSlice& |
474 | output_types, const |
475 | gtl::ArraySlice<PartialTensorShape>& |
476 | output_shapes, const |
477 | DatasetToSingleElement::Attrs& |
478 | attrs) { |
479 | if (!scope.ok()) return; |
480 | auto _dataset = ::tensorflow::ops::AsNodeOut(scope, dataset); |
481 | if (!scope.ok()) return; |
482 | ::tensorflow::Node* ret; |
483 | const auto unique_name = scope.GetUniqueNameForOp("DatasetToSingleElement" ); |
484 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DatasetToSingleElement" ) |
485 | .Input(_dataset) |
486 | .Attr("output_types" , output_types) |
487 | .Attr("output_shapes" , output_shapes) |
488 | .Attr("metadata" , attrs.metadata_) |
489 | ; |
490 | scope.UpdateBuilder(&builder); |
491 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
492 | if (!scope.ok()) return; |
493 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
494 | this->operation = Operation(ret); |
495 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
496 | this->components.push_back(Output(ret, i)); |
497 | } |
498 | |
499 | DatasetToSingleElement::DatasetToSingleElement(const ::tensorflow::Scope& |
500 | scope, ::tensorflow::Input |
501 | dataset, const DataTypeSlice& |
502 | output_types, const |
503 | gtl::ArraySlice<PartialTensorShape>& |
504 | output_shapes) |
505 | : DatasetToSingleElement(scope, dataset, output_types, output_shapes, DatasetToSingleElement::Attrs()) {} |
506 | |
507 | DeleteIterator::DeleteIterator(const ::tensorflow::Scope& scope, |
508 | ::tensorflow::Input handle, ::tensorflow::Input |
509 | deleter) { |
510 | if (!scope.ok()) return; |
511 | auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle); |
512 | if (!scope.ok()) return; |
513 | auto _deleter = ::tensorflow::ops::AsNodeOut(scope, deleter); |
514 | if (!scope.ok()) return; |
515 | ::tensorflow::Node* ret; |
516 | const auto unique_name = scope.GetUniqueNameForOp("DeleteIterator" ); |
517 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteIterator" ) |
518 | .Input(_handle) |
519 | .Input(_deleter) |
520 | ; |
521 | scope.UpdateBuilder(&builder); |
522 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
523 | if (!scope.ok()) return; |
524 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
525 | this->operation = Operation(ret); |
526 | return; |
527 | } |
528 | |
529 | DeleteMemoryCache::DeleteMemoryCache(const ::tensorflow::Scope& scope, |
530 | ::tensorflow::Input handle, |
531 | ::tensorflow::Input deleter) { |
532 | if (!scope.ok()) return; |
533 | auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle); |
534 | if (!scope.ok()) return; |
535 | auto _deleter = ::tensorflow::ops::AsNodeOut(scope, deleter); |
536 | if (!scope.ok()) return; |
537 | ::tensorflow::Node* ret; |
538 | const auto unique_name = scope.GetUniqueNameForOp("DeleteMemoryCache" ); |
539 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteMemoryCache" ) |
540 | .Input(_handle) |
541 | .Input(_deleter) |
542 | ; |
543 | scope.UpdateBuilder(&builder); |
544 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
545 | if (!scope.ok()) return; |
546 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
547 | this->operation = Operation(ret); |
548 | return; |
549 | } |
550 | |
551 | DeleteMultiDeviceIterator::DeleteMultiDeviceIterator(const ::tensorflow::Scope& |
552 | scope, ::tensorflow::Input |
553 | multi_device_iterator, |
554 | ::tensorflow::InputList |
555 | iterators, |
556 | ::tensorflow::Input |
557 | deleter) { |
558 | if (!scope.ok()) return; |
559 | auto _multi_device_iterator = ::tensorflow::ops::AsNodeOut(scope, multi_device_iterator); |
560 | if (!scope.ok()) return; |
561 | auto _iterators = ::tensorflow::ops::AsNodeOutList(scope, iterators); |
562 | if (!scope.ok()) return; |
563 | auto _deleter = ::tensorflow::ops::AsNodeOut(scope, deleter); |
564 | if (!scope.ok()) return; |
565 | ::tensorflow::Node* ret; |
566 | const auto unique_name = scope.GetUniqueNameForOp("DeleteMultiDeviceIterator" ); |
567 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteMultiDeviceIterator" ) |
568 | .Input(_multi_device_iterator) |
569 | .Input(_iterators) |
570 | .Input(_deleter) |
571 | ; |
572 | scope.UpdateBuilder(&builder); |
573 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
574 | if (!scope.ok()) return; |
575 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
576 | this->operation = Operation(ret); |
577 | return; |
578 | } |
579 | |
580 | DeleteRandomSeedGenerator::DeleteRandomSeedGenerator(const ::tensorflow::Scope& |
581 | scope, ::tensorflow::Input |
582 | handle, |
583 | ::tensorflow::Input |
584 | deleter) { |
585 | if (!scope.ok()) return; |
586 | auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle); |
587 | if (!scope.ok()) return; |
588 | auto _deleter = ::tensorflow::ops::AsNodeOut(scope, deleter); |
589 | if (!scope.ok()) return; |
590 | ::tensorflow::Node* ret; |
591 | const auto unique_name = scope.GetUniqueNameForOp("DeleteRandomSeedGenerator" ); |
592 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteRandomSeedGenerator" ) |
593 | .Input(_handle) |
594 | .Input(_deleter) |
595 | ; |
596 | scope.UpdateBuilder(&builder); |
597 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
598 | if (!scope.ok()) return; |
599 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
600 | this->operation = Operation(ret); |
601 | return; |
602 | } |
603 | |
604 | DeleteSeedGenerator::DeleteSeedGenerator(const ::tensorflow::Scope& scope, |
605 | ::tensorflow::Input handle, |
606 | ::tensorflow::Input deleter) { |
607 | if (!scope.ok()) return; |
608 | auto _handle = ::tensorflow::ops::AsNodeOut(scope, handle); |
609 | if (!scope.ok()) return; |
610 | auto _deleter = ::tensorflow::ops::AsNodeOut(scope, deleter); |
611 | if (!scope.ok()) return; |
612 | ::tensorflow::Node* ret; |
613 | const auto unique_name = scope.GetUniqueNameForOp("DeleteSeedGenerator" ); |
614 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeleteSeedGenerator" ) |
615 | .Input(_handle) |
616 | .Input(_deleter) |
617 | ; |
618 | scope.UpdateBuilder(&builder); |
619 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
620 | if (!scope.ok()) return; |
621 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
622 | this->operation = Operation(ret); |
623 | return; |
624 | } |
625 | |
626 | DummyMemoryCache::DummyMemoryCache(const ::tensorflow::Scope& scope) { |
627 | if (!scope.ok()) return; |
628 | ::tensorflow::Node* ret; |
629 | const auto unique_name = scope.GetUniqueNameForOp("DummyMemoryCache" ); |
630 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DummyMemoryCache" ) |
631 | ; |
632 | scope.UpdateBuilder(&builder); |
633 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
634 | if (!scope.ok()) return; |
635 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
636 | this->operation = Operation(ret); |
637 | this->handle = Output(ret, 0); |
638 | } |
639 | |
640 | DummySeedGenerator::DummySeedGenerator(const ::tensorflow::Scope& scope) { |
641 | if (!scope.ok()) return; |
642 | ::tensorflow::Node* ret; |
643 | const auto unique_name = scope.GetUniqueNameForOp("DummySeedGenerator" ); |
644 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DummySeedGenerator" ) |
645 | ; |
646 | scope.UpdateBuilder(&builder); |
647 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
648 | if (!scope.ok()) return; |
649 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
650 | this->operation = Operation(ret); |
651 | this->handle = Output(ret, 0); |
652 | } |
653 | |
654 | FilterByLastComponentDataset::FilterByLastComponentDataset(const |
655 | ::tensorflow::Scope& |
656 | scope, |
657 | ::tensorflow::Input |
658 | input_dataset, const |
659 | DataTypeSlice& |
660 | output_types, const |
661 | gtl::ArraySlice<PartialTensorShape>& |
662 | output_shapes) { |
663 | if (!scope.ok()) return; |
664 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
665 | if (!scope.ok()) return; |
666 | ::tensorflow::Node* ret; |
667 | const auto unique_name = scope.GetUniqueNameForOp("FilterByLastComponentDataset" ); |
668 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FilterByLastComponentDataset" ) |
669 | .Input(_input_dataset) |
670 | .Attr("output_types" , output_types) |
671 | .Attr("output_shapes" , output_shapes) |
672 | ; |
673 | scope.UpdateBuilder(&builder); |
674 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
675 | if (!scope.ok()) return; |
676 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
677 | this->operation = Operation(ret); |
678 | this->output = Output(ret, 0); |
679 | } |
680 | |
681 | FilterDataset::FilterDataset(const ::tensorflow::Scope& scope, |
682 | ::tensorflow::Input input_dataset, |
683 | ::tensorflow::InputList other_arguments, const |
684 | NameAttrList& predicate, const DataTypeSlice& |
685 | output_types, const |
686 | gtl::ArraySlice<PartialTensorShape>& |
687 | output_shapes, const FilterDataset::Attrs& attrs) { |
688 | if (!scope.ok()) return; |
689 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
690 | if (!scope.ok()) return; |
691 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
692 | if (!scope.ok()) return; |
693 | ::tensorflow::Node* ret; |
694 | const auto unique_name = scope.GetUniqueNameForOp("FilterDataset" ); |
695 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FilterDataset" ) |
696 | .Input(_input_dataset) |
697 | .Input(_other_arguments) |
698 | .Attr("predicate" , predicate) |
699 | .Attr("output_types" , output_types) |
700 | .Attr("output_shapes" , output_shapes) |
701 | .Attr("metadata" , attrs.metadata_) |
702 | ; |
703 | scope.UpdateBuilder(&builder); |
704 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
705 | if (!scope.ok()) return; |
706 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
707 | this->operation = Operation(ret); |
708 | this->handle = Output(ret, 0); |
709 | } |
710 | |
711 | FilterDataset::FilterDataset(const ::tensorflow::Scope& scope, |
712 | ::tensorflow::Input input_dataset, |
713 | ::tensorflow::InputList other_arguments, const |
714 | NameAttrList& predicate, const DataTypeSlice& |
715 | output_types, const |
716 | gtl::ArraySlice<PartialTensorShape>& |
717 | output_shapes) |
718 | : FilterDataset(scope, input_dataset, other_arguments, predicate, output_types, output_shapes, FilterDataset::Attrs()) {} |
719 | |
720 | FinalizeDataset::FinalizeDataset(const ::tensorflow::Scope& scope, |
721 | ::tensorflow::Input input_dataset, const |
722 | DataTypeSlice& output_types, const |
723 | gtl::ArraySlice<PartialTensorShape>& |
724 | output_shapes, const FinalizeDataset::Attrs& |
725 | attrs) { |
726 | if (!scope.ok()) return; |
727 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
728 | if (!scope.ok()) return; |
729 | ::tensorflow::Node* ret; |
730 | const auto unique_name = scope.GetUniqueNameForOp("FinalizeDataset" ); |
731 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FinalizeDataset" ) |
732 | .Input(_input_dataset) |
733 | .Attr("has_captured_ref" , attrs.has_captured_ref_) |
734 | .Attr("output_types" , output_types) |
735 | .Attr("output_shapes" , output_shapes) |
736 | ; |
737 | scope.UpdateBuilder(&builder); |
738 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
739 | if (!scope.ok()) return; |
740 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
741 | this->operation = Operation(ret); |
742 | this->handle = Output(ret, 0); |
743 | } |
744 | |
745 | FinalizeDataset::FinalizeDataset(const ::tensorflow::Scope& scope, |
746 | ::tensorflow::Input input_dataset, const |
747 | DataTypeSlice& output_types, const |
748 | gtl::ArraySlice<PartialTensorShape>& |
749 | output_shapes) |
750 | : FinalizeDataset(scope, input_dataset, output_types, output_shapes, FinalizeDataset::Attrs()) {} |
751 | |
752 | FixedLengthRecordDataset::FixedLengthRecordDataset(const ::tensorflow::Scope& |
753 | scope, ::tensorflow::Input |
754 | filenames, |
755 | ::tensorflow::Input |
756 | , |
757 | ::tensorflow::Input |
758 | record_bytes, |
759 | ::tensorflow::Input |
760 | , |
761 | ::tensorflow::Input |
762 | buffer_size, const |
763 | FixedLengthRecordDataset::Attrs& |
764 | attrs) { |
765 | if (!scope.ok()) return; |
766 | auto _filenames = ::tensorflow::ops::AsNodeOut(scope, filenames); |
767 | if (!scope.ok()) return; |
768 | auto = ::tensorflow::ops::AsNodeOut(scope, header_bytes); |
769 | if (!scope.ok()) return; |
770 | auto _record_bytes = ::tensorflow::ops::AsNodeOut(scope, record_bytes); |
771 | if (!scope.ok()) return; |
772 | auto = ::tensorflow::ops::AsNodeOut(scope, footer_bytes); |
773 | if (!scope.ok()) return; |
774 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
775 | if (!scope.ok()) return; |
776 | ::tensorflow::Node* ret; |
777 | const auto unique_name = scope.GetUniqueNameForOp("FixedLengthRecordDataset" ); |
778 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FixedLengthRecordDataset" ) |
779 | .Input(_filenames) |
780 | .Input(_header_bytes) |
781 | .Input(_record_bytes) |
782 | .Input(_footer_bytes) |
783 | .Input(_buffer_size) |
784 | .Attr("metadata" , attrs.metadata_) |
785 | ; |
786 | scope.UpdateBuilder(&builder); |
787 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
788 | if (!scope.ok()) return; |
789 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
790 | this->operation = Operation(ret); |
791 | this->handle = Output(ret, 0); |
792 | } |
793 | |
794 | FixedLengthRecordDataset::FixedLengthRecordDataset(const ::tensorflow::Scope& |
795 | scope, ::tensorflow::Input |
796 | filenames, |
797 | ::tensorflow::Input |
798 | , |
799 | ::tensorflow::Input |
800 | record_bytes, |
801 | ::tensorflow::Input |
802 | , |
803 | ::tensorflow::Input |
804 | buffer_size) |
805 | : FixedLengthRecordDataset(scope, filenames, header_bytes, record_bytes, footer_bytes, buffer_size, FixedLengthRecordDataset::Attrs()) {} |
806 | |
807 | FixedLengthRecordDatasetV2::FixedLengthRecordDatasetV2(const |
808 | ::tensorflow::Scope& |
809 | scope, |
810 | ::tensorflow::Input |
811 | filenames, |
812 | ::tensorflow::Input |
813 | , |
814 | ::tensorflow::Input |
815 | record_bytes, |
816 | ::tensorflow::Input |
817 | , |
818 | ::tensorflow::Input |
819 | buffer_size, |
820 | ::tensorflow::Input |
821 | compression_type, const |
822 | FixedLengthRecordDatasetV2::Attrs& |
823 | attrs) { |
824 | if (!scope.ok()) return; |
825 | auto _filenames = ::tensorflow::ops::AsNodeOut(scope, filenames); |
826 | if (!scope.ok()) return; |
827 | auto = ::tensorflow::ops::AsNodeOut(scope, header_bytes); |
828 | if (!scope.ok()) return; |
829 | auto _record_bytes = ::tensorflow::ops::AsNodeOut(scope, record_bytes); |
830 | if (!scope.ok()) return; |
831 | auto = ::tensorflow::ops::AsNodeOut(scope, footer_bytes); |
832 | if (!scope.ok()) return; |
833 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
834 | if (!scope.ok()) return; |
835 | auto _compression_type = ::tensorflow::ops::AsNodeOut(scope, compression_type); |
836 | if (!scope.ok()) return; |
837 | ::tensorflow::Node* ret; |
838 | const auto unique_name = scope.GetUniqueNameForOp("FixedLengthRecordDatasetV2" ); |
839 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FixedLengthRecordDatasetV2" ) |
840 | .Input(_filenames) |
841 | .Input(_header_bytes) |
842 | .Input(_record_bytes) |
843 | .Input(_footer_bytes) |
844 | .Input(_buffer_size) |
845 | .Input(_compression_type) |
846 | .Attr("metadata" , attrs.metadata_) |
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 | this->handle = Output(ret, 0); |
854 | } |
855 | |
856 | FixedLengthRecordDatasetV2::FixedLengthRecordDatasetV2(const |
857 | ::tensorflow::Scope& |
858 | scope, |
859 | ::tensorflow::Input |
860 | filenames, |
861 | ::tensorflow::Input |
862 | , |
863 | ::tensorflow::Input |
864 | record_bytes, |
865 | ::tensorflow::Input |
866 | , |
867 | ::tensorflow::Input |
868 | buffer_size, |
869 | ::tensorflow::Input |
870 | compression_type) |
871 | : FixedLengthRecordDatasetV2(scope, filenames, header_bytes, record_bytes, footer_bytes, buffer_size, compression_type, FixedLengthRecordDatasetV2::Attrs()) {} |
872 | |
873 | FlatMapDataset::FlatMapDataset(const ::tensorflow::Scope& scope, |
874 | ::tensorflow::Input input_dataset, |
875 | ::tensorflow::InputList other_arguments, const |
876 | NameAttrList& f, const DataTypeSlice& |
877 | output_types, const |
878 | gtl::ArraySlice<PartialTensorShape>& |
879 | output_shapes, const FlatMapDataset::Attrs& |
880 | attrs) { |
881 | if (!scope.ok()) return; |
882 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
883 | if (!scope.ok()) return; |
884 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
885 | if (!scope.ok()) return; |
886 | ::tensorflow::Node* ret; |
887 | const auto unique_name = scope.GetUniqueNameForOp("FlatMapDataset" ); |
888 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FlatMapDataset" ) |
889 | .Input(_input_dataset) |
890 | .Input(_other_arguments) |
891 | .Attr("f" , f) |
892 | .Attr("output_types" , output_types) |
893 | .Attr("output_shapes" , output_shapes) |
894 | .Attr("metadata" , attrs.metadata_) |
895 | ; |
896 | scope.UpdateBuilder(&builder); |
897 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
898 | if (!scope.ok()) return; |
899 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
900 | this->operation = Operation(ret); |
901 | this->handle = Output(ret, 0); |
902 | } |
903 | |
904 | FlatMapDataset::FlatMapDataset(const ::tensorflow::Scope& scope, |
905 | ::tensorflow::Input input_dataset, |
906 | ::tensorflow::InputList other_arguments, const |
907 | NameAttrList& f, const DataTypeSlice& |
908 | output_types, const |
909 | gtl::ArraySlice<PartialTensorShape>& |
910 | output_shapes) |
911 | : FlatMapDataset(scope, input_dataset, other_arguments, f, output_types, output_shapes, FlatMapDataset::Attrs()) {} |
912 | |
913 | GeneratorDataset::GeneratorDataset(const ::tensorflow::Scope& scope, |
914 | ::tensorflow::InputList |
915 | init_func_other_args, |
916 | ::tensorflow::InputList |
917 | next_func_other_args, |
918 | ::tensorflow::InputList |
919 | finalize_func_other_args, const |
920 | NameAttrList& init_func, const NameAttrList& |
921 | next_func, const NameAttrList& |
922 | finalize_func, const DataTypeSlice& |
923 | output_types, const |
924 | gtl::ArraySlice<PartialTensorShape>& |
925 | output_shapes, const |
926 | GeneratorDataset::Attrs& attrs) { |
927 | if (!scope.ok()) return; |
928 | auto _init_func_other_args = ::tensorflow::ops::AsNodeOutList(scope, init_func_other_args); |
929 | if (!scope.ok()) return; |
930 | auto _next_func_other_args = ::tensorflow::ops::AsNodeOutList(scope, next_func_other_args); |
931 | if (!scope.ok()) return; |
932 | auto _finalize_func_other_args = ::tensorflow::ops::AsNodeOutList(scope, finalize_func_other_args); |
933 | if (!scope.ok()) return; |
934 | ::tensorflow::Node* ret; |
935 | const auto unique_name = scope.GetUniqueNameForOp("GeneratorDataset" ); |
936 | auto builder = ::tensorflow::NodeBuilder(unique_name, "GeneratorDataset" ) |
937 | .Input(_init_func_other_args) |
938 | .Input(_next_func_other_args) |
939 | .Input(_finalize_func_other_args) |
940 | .Attr("init_func" , init_func) |
941 | .Attr("next_func" , next_func) |
942 | .Attr("finalize_func" , finalize_func) |
943 | .Attr("output_types" , output_types) |
944 | .Attr("output_shapes" , output_shapes) |
945 | .Attr("metadata" , attrs.metadata_) |
946 | ; |
947 | scope.UpdateBuilder(&builder); |
948 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
949 | if (!scope.ok()) return; |
950 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
951 | this->operation = Operation(ret); |
952 | this->handle = Output(ret, 0); |
953 | } |
954 | |
955 | GeneratorDataset::GeneratorDataset(const ::tensorflow::Scope& scope, |
956 | ::tensorflow::InputList |
957 | init_func_other_args, |
958 | ::tensorflow::InputList |
959 | next_func_other_args, |
960 | ::tensorflow::InputList |
961 | finalize_func_other_args, const |
962 | NameAttrList& init_func, const NameAttrList& |
963 | next_func, const NameAttrList& |
964 | finalize_func, const DataTypeSlice& |
965 | output_types, const |
966 | gtl::ArraySlice<PartialTensorShape>& |
967 | output_shapes) |
968 | : GeneratorDataset(scope, init_func_other_args, next_func_other_args, finalize_func_other_args, init_func, next_func, finalize_func, output_types, output_shapes, GeneratorDataset::Attrs()) {} |
969 | |
970 | GetOptions::GetOptions(const ::tensorflow::Scope& scope, ::tensorflow::Input |
971 | input_dataset) { |
972 | if (!scope.ok()) return; |
973 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
974 | if (!scope.ok()) return; |
975 | ::tensorflow::Node* ret; |
976 | const auto unique_name = scope.GetUniqueNameForOp("GetOptions" ); |
977 | auto builder = ::tensorflow::NodeBuilder(unique_name, "GetOptions" ) |
978 | .Input(_input_dataset) |
979 | ; |
980 | scope.UpdateBuilder(&builder); |
981 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
982 | if (!scope.ok()) return; |
983 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
984 | this->operation = Operation(ret); |
985 | this->serialized_options = Output(ret, 0); |
986 | } |
987 | |
988 | InterleaveDataset::InterleaveDataset(const ::tensorflow::Scope& scope, |
989 | ::tensorflow::Input input_dataset, |
990 | ::tensorflow::InputList other_arguments, |
991 | ::tensorflow::Input cycle_length, |
992 | ::tensorflow::Input block_length, const |
993 | NameAttrList& f, const DataTypeSlice& |
994 | output_types, const |
995 | gtl::ArraySlice<PartialTensorShape>& |
996 | output_shapes, const |
997 | InterleaveDataset::Attrs& attrs) { |
998 | if (!scope.ok()) return; |
999 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1000 | if (!scope.ok()) return; |
1001 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1002 | if (!scope.ok()) return; |
1003 | auto _cycle_length = ::tensorflow::ops::AsNodeOut(scope, cycle_length); |
1004 | if (!scope.ok()) return; |
1005 | auto _block_length = ::tensorflow::ops::AsNodeOut(scope, block_length); |
1006 | if (!scope.ok()) return; |
1007 | ::tensorflow::Node* ret; |
1008 | const auto unique_name = scope.GetUniqueNameForOp("InterleaveDataset" ); |
1009 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InterleaveDataset" ) |
1010 | .Input(_input_dataset) |
1011 | .Input(_other_arguments) |
1012 | .Input(_cycle_length) |
1013 | .Input(_block_length) |
1014 | .Attr("f" , f) |
1015 | .Attr("output_types" , output_types) |
1016 | .Attr("output_shapes" , output_shapes) |
1017 | .Attr("metadata" , attrs.metadata_) |
1018 | ; |
1019 | scope.UpdateBuilder(&builder); |
1020 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1021 | if (!scope.ok()) return; |
1022 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1023 | this->operation = Operation(ret); |
1024 | this->handle = Output(ret, 0); |
1025 | } |
1026 | |
1027 | InterleaveDataset::InterleaveDataset(const ::tensorflow::Scope& scope, |
1028 | ::tensorflow::Input input_dataset, |
1029 | ::tensorflow::InputList other_arguments, |
1030 | ::tensorflow::Input cycle_length, |
1031 | ::tensorflow::Input block_length, const |
1032 | NameAttrList& f, const DataTypeSlice& |
1033 | output_types, const |
1034 | gtl::ArraySlice<PartialTensorShape>& |
1035 | output_shapes) |
1036 | : InterleaveDataset(scope, input_dataset, other_arguments, cycle_length, block_length, f, output_types, output_shapes, InterleaveDataset::Attrs()) {} |
1037 | |
1038 | IteratorFromStringHandleV2::IteratorFromStringHandleV2(const |
1039 | ::tensorflow::Scope& |
1040 | scope, |
1041 | ::tensorflow::Input |
1042 | string_handle, const |
1043 | IteratorFromStringHandleV2::Attrs& |
1044 | attrs) { |
1045 | if (!scope.ok()) return; |
1046 | auto _string_handle = ::tensorflow::ops::AsNodeOut(scope, string_handle); |
1047 | if (!scope.ok()) return; |
1048 | ::tensorflow::Node* ret; |
1049 | const auto unique_name = scope.GetUniqueNameForOp("IteratorFromStringHandleV2" ); |
1050 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorFromStringHandleV2" ) |
1051 | .Input(_string_handle) |
1052 | .Attr("output_types" , attrs.output_types_) |
1053 | .Attr("output_shapes" , attrs.output_shapes_) |
1054 | ; |
1055 | scope.UpdateBuilder(&builder); |
1056 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1057 | if (!scope.ok()) return; |
1058 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1059 | this->operation = Operation(ret); |
1060 | this->resource_handle = Output(ret, 0); |
1061 | } |
1062 | |
1063 | IteratorFromStringHandleV2::IteratorFromStringHandleV2(const |
1064 | ::tensorflow::Scope& |
1065 | scope, |
1066 | ::tensorflow::Input |
1067 | string_handle) |
1068 | : IteratorFromStringHandleV2(scope, string_handle, IteratorFromStringHandleV2::Attrs()) {} |
1069 | |
1070 | IteratorV2::IteratorV2(const ::tensorflow::Scope& scope, StringPiece |
1071 | shared_name, StringPiece container, const DataTypeSlice& |
1072 | output_types, const gtl::ArraySlice<PartialTensorShape>& |
1073 | output_shapes) { |
1074 | if (!scope.ok()) return; |
1075 | ::tensorflow::Node* ret; |
1076 | const auto unique_name = scope.GetUniqueNameForOp("IteratorV2" ); |
1077 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorV2" ) |
1078 | .Attr("shared_name" , shared_name) |
1079 | .Attr("container" , container) |
1080 | .Attr("output_types" , output_types) |
1081 | .Attr("output_shapes" , output_shapes) |
1082 | ; |
1083 | scope.UpdateBuilder(&builder); |
1084 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1085 | if (!scope.ok()) return; |
1086 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1087 | this->operation = Operation(ret); |
1088 | this->handle = Output(ret, 0); |
1089 | } |
1090 | |
1091 | MapDataset::MapDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1092 | input_dataset, ::tensorflow::InputList other_arguments, |
1093 | const NameAttrList& f, const DataTypeSlice& |
1094 | output_types, const gtl::ArraySlice<PartialTensorShape>& |
1095 | output_shapes, const MapDataset::Attrs& attrs) { |
1096 | if (!scope.ok()) return; |
1097 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1098 | if (!scope.ok()) return; |
1099 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1100 | if (!scope.ok()) return; |
1101 | ::tensorflow::Node* ret; |
1102 | const auto unique_name = scope.GetUniqueNameForOp("MapDataset" ); |
1103 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MapDataset" ) |
1104 | .Input(_input_dataset) |
1105 | .Input(_other_arguments) |
1106 | .Attr("f" , f) |
1107 | .Attr("output_types" , output_types) |
1108 | .Attr("output_shapes" , output_shapes) |
1109 | .Attr("use_inter_op_parallelism" , attrs.use_inter_op_parallelism_) |
1110 | .Attr("preserve_cardinality" , attrs.preserve_cardinality_) |
1111 | .Attr("metadata" , attrs.metadata_) |
1112 | ; |
1113 | scope.UpdateBuilder(&builder); |
1114 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1115 | if (!scope.ok()) return; |
1116 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1117 | this->operation = Operation(ret); |
1118 | this->handle = Output(ret, 0); |
1119 | } |
1120 | |
1121 | MapDataset::MapDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1122 | input_dataset, ::tensorflow::InputList other_arguments, |
1123 | const NameAttrList& f, const DataTypeSlice& |
1124 | output_types, const gtl::ArraySlice<PartialTensorShape>& |
1125 | output_shapes) |
1126 | : MapDataset(scope, input_dataset, other_arguments, f, output_types, output_shapes, MapDataset::Attrs()) {} |
1127 | |
1128 | MapDefun::MapDefun(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
1129 | arguments, ::tensorflow::InputList captured_inputs, const |
1130 | DataTypeSlice& output_types, const |
1131 | gtl::ArraySlice<PartialTensorShape>& output_shapes, const |
1132 | NameAttrList& f, const MapDefun::Attrs& attrs) { |
1133 | if (!scope.ok()) return; |
1134 | auto _arguments = ::tensorflow::ops::AsNodeOutList(scope, arguments); |
1135 | if (!scope.ok()) return; |
1136 | auto _captured_inputs = ::tensorflow::ops::AsNodeOutList(scope, captured_inputs); |
1137 | if (!scope.ok()) return; |
1138 | ::tensorflow::Node* ret; |
1139 | const auto unique_name = scope.GetUniqueNameForOp("MapDefun" ); |
1140 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MapDefun" ) |
1141 | .Input(_arguments) |
1142 | .Input(_captured_inputs) |
1143 | .Attr("output_types" , output_types) |
1144 | .Attr("output_shapes" , output_shapes) |
1145 | .Attr("f" , f) |
1146 | .Attr("max_intra_op_parallelism" , attrs.max_intra_op_parallelism_) |
1147 | ; |
1148 | scope.UpdateBuilder(&builder); |
1149 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1150 | if (!scope.ok()) return; |
1151 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1152 | this->operation = Operation(ret); |
1153 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
1154 | this->output.push_back(Output(ret, i)); |
1155 | } |
1156 | |
1157 | MapDefun::MapDefun(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
1158 | arguments, ::tensorflow::InputList captured_inputs, const |
1159 | DataTypeSlice& output_types, const |
1160 | gtl::ArraySlice<PartialTensorShape>& output_shapes, const |
1161 | NameAttrList& f) |
1162 | : MapDefun(scope, arguments, captured_inputs, output_types, output_shapes, f, MapDefun::Attrs()) {} |
1163 | |
1164 | ModelDataset::ModelDataset(const ::tensorflow::Scope& scope, |
1165 | ::tensorflow::Input input_dataset, const |
1166 | DataTypeSlice& output_types, const |
1167 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
1168 | const ModelDataset::Attrs& attrs) { |
1169 | if (!scope.ok()) return; |
1170 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1171 | if (!scope.ok()) return; |
1172 | ::tensorflow::Node* ret; |
1173 | const auto unique_name = scope.GetUniqueNameForOp("ModelDataset" ); |
1174 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ModelDataset" ) |
1175 | .Input(_input_dataset) |
1176 | .Attr("algorithm" , attrs.algorithm_) |
1177 | .Attr("cpu_budget" , attrs.cpu_budget_) |
1178 | .Attr("ram_budget" , attrs.ram_budget_) |
1179 | .Attr("output_types" , output_types) |
1180 | .Attr("output_shapes" , output_shapes) |
1181 | ; |
1182 | scope.UpdateBuilder(&builder); |
1183 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1184 | if (!scope.ok()) return; |
1185 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1186 | this->operation = Operation(ret); |
1187 | this->handle = Output(ret, 0); |
1188 | } |
1189 | |
1190 | ModelDataset::ModelDataset(const ::tensorflow::Scope& scope, |
1191 | ::tensorflow::Input input_dataset, const |
1192 | DataTypeSlice& output_types, const |
1193 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
1194 | : ModelDataset(scope, input_dataset, output_types, output_shapes, ModelDataset::Attrs()) {} |
1195 | |
1196 | MultiDeviceIterator::MultiDeviceIterator(const ::tensorflow::Scope& scope, |
1197 | const |
1198 | gtl::ArraySlice<::tensorflow::tstring>& |
1199 | devices, StringPiece shared_name, |
1200 | StringPiece container, const |
1201 | DataTypeSlice& output_types, const |
1202 | gtl::ArraySlice<PartialTensorShape>& |
1203 | output_shapes) { |
1204 | if (!scope.ok()) return; |
1205 | ::tensorflow::Node* ret; |
1206 | const auto unique_name = scope.GetUniqueNameForOp("MultiDeviceIterator" ); |
1207 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MultiDeviceIterator" ) |
1208 | .Attr("devices" , devices) |
1209 | .Attr("shared_name" , shared_name) |
1210 | .Attr("container" , container) |
1211 | .Attr("output_types" , output_types) |
1212 | .Attr("output_shapes" , output_shapes) |
1213 | ; |
1214 | scope.UpdateBuilder(&builder); |
1215 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1216 | if (!scope.ok()) return; |
1217 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1218 | this->operation = Operation(ret); |
1219 | this->handle = Output(ret, 0); |
1220 | } |
1221 | |
1222 | MultiDeviceIteratorFromStringHandle::MultiDeviceIteratorFromStringHandle(const |
1223 | ::tensorflow::Scope& |
1224 | scope, |
1225 | ::tensorflow::Input |
1226 | string_handle, |
1227 | const |
1228 | MultiDeviceIteratorFromStringHandle::Attrs& |
1229 | attrs) { |
1230 | if (!scope.ok()) return; |
1231 | auto _string_handle = ::tensorflow::ops::AsNodeOut(scope, string_handle); |
1232 | if (!scope.ok()) return; |
1233 | ::tensorflow::Node* ret; |
1234 | const auto unique_name = scope.GetUniqueNameForOp("MultiDeviceIteratorFromStringHandle" ); |
1235 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MultiDeviceIteratorFromStringHandle" ) |
1236 | .Input(_string_handle) |
1237 | .Attr("output_types" , attrs.output_types_) |
1238 | .Attr("output_shapes" , attrs.output_shapes_) |
1239 | ; |
1240 | scope.UpdateBuilder(&builder); |
1241 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1242 | if (!scope.ok()) return; |
1243 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1244 | this->operation = Operation(ret); |
1245 | this->multi_device_iterator = Output(ret, 0); |
1246 | } |
1247 | |
1248 | MultiDeviceIteratorFromStringHandle::MultiDeviceIteratorFromStringHandle(const |
1249 | ::tensorflow::Scope& |
1250 | scope, |
1251 | ::tensorflow::Input |
1252 | string_handle) |
1253 | : MultiDeviceIteratorFromStringHandle(scope, string_handle, MultiDeviceIteratorFromStringHandle::Attrs()) {} |
1254 | |
1255 | MultiDeviceIteratorGetNextFromShard::MultiDeviceIteratorGetNextFromShard(const |
1256 | ::tensorflow::Scope& |
1257 | scope, |
1258 | ::tensorflow::Input |
1259 | multi_device_iterator, |
1260 | ::tensorflow::Input |
1261 | shard_num, |
1262 | ::tensorflow::Input |
1263 | incarnation_id, |
1264 | const |
1265 | DataTypeSlice& |
1266 | output_types, |
1267 | const |
1268 | gtl::ArraySlice<PartialTensorShape>& |
1269 | output_shapes) { |
1270 | if (!scope.ok()) return; |
1271 | auto _multi_device_iterator = ::tensorflow::ops::AsNodeOut(scope, multi_device_iterator); |
1272 | if (!scope.ok()) return; |
1273 | auto _shard_num = ::tensorflow::ops::AsNodeOut(scope, shard_num); |
1274 | if (!scope.ok()) return; |
1275 | auto _incarnation_id = ::tensorflow::ops::AsNodeOut(scope, incarnation_id); |
1276 | if (!scope.ok()) return; |
1277 | ::tensorflow::Node* ret; |
1278 | const auto unique_name = scope.GetUniqueNameForOp("MultiDeviceIteratorGetNextFromShard" ); |
1279 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MultiDeviceIteratorGetNextFromShard" ) |
1280 | .Input(_multi_device_iterator) |
1281 | .Input(_shard_num) |
1282 | .Input(_incarnation_id) |
1283 | .Attr("output_types" , output_types) |
1284 | .Attr("output_shapes" , output_shapes) |
1285 | ; |
1286 | scope.UpdateBuilder(&builder); |
1287 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1288 | if (!scope.ok()) return; |
1289 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1290 | this->operation = Operation(ret); |
1291 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
1292 | this->components.push_back(Output(ret, i)); |
1293 | } |
1294 | |
1295 | MultiDeviceIteratorInit::MultiDeviceIteratorInit(const ::tensorflow::Scope& |
1296 | scope, ::tensorflow::Input |
1297 | dataset, ::tensorflow::Input |
1298 | multi_device_iterator, |
1299 | ::tensorflow::Input |
1300 | max_buffer_size) { |
1301 | if (!scope.ok()) return; |
1302 | auto _dataset = ::tensorflow::ops::AsNodeOut(scope, dataset); |
1303 | if (!scope.ok()) return; |
1304 | auto _multi_device_iterator = ::tensorflow::ops::AsNodeOut(scope, multi_device_iterator); |
1305 | if (!scope.ok()) return; |
1306 | auto _max_buffer_size = ::tensorflow::ops::AsNodeOut(scope, max_buffer_size); |
1307 | if (!scope.ok()) return; |
1308 | ::tensorflow::Node* ret; |
1309 | const auto unique_name = scope.GetUniqueNameForOp("MultiDeviceIteratorInit" ); |
1310 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MultiDeviceIteratorInit" ) |
1311 | .Input(_dataset) |
1312 | .Input(_multi_device_iterator) |
1313 | .Input(_max_buffer_size) |
1314 | ; |
1315 | scope.UpdateBuilder(&builder); |
1316 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1317 | if (!scope.ok()) return; |
1318 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1319 | this->operation = Operation(ret); |
1320 | this->incarnation_id = Output(ret, 0); |
1321 | } |
1322 | |
1323 | MultiDeviceIteratorToStringHandle::MultiDeviceIteratorToStringHandle(const |
1324 | ::tensorflow::Scope& |
1325 | scope, |
1326 | ::tensorflow::Input |
1327 | multi_device_iterator) { |
1328 | if (!scope.ok()) return; |
1329 | auto _multi_device_iterator = ::tensorflow::ops::AsNodeOut(scope, multi_device_iterator); |
1330 | if (!scope.ok()) return; |
1331 | ::tensorflow::Node* ret; |
1332 | const auto unique_name = scope.GetUniqueNameForOp("MultiDeviceIteratorToStringHandle" ); |
1333 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MultiDeviceIteratorToStringHandle" ) |
1334 | .Input(_multi_device_iterator) |
1335 | ; |
1336 | scope.UpdateBuilder(&builder); |
1337 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1338 | if (!scope.ok()) return; |
1339 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1340 | this->operation = Operation(ret); |
1341 | this->string_handle = Output(ret, 0); |
1342 | } |
1343 | |
1344 | OptimizeDataset::OptimizeDataset(const ::tensorflow::Scope& scope, |
1345 | ::tensorflow::Input input_dataset, |
1346 | ::tensorflow::Input optimizations, const |
1347 | DataTypeSlice& output_types, const |
1348 | gtl::ArraySlice<PartialTensorShape>& |
1349 | output_shapes, const OptimizeDataset::Attrs& |
1350 | attrs) { |
1351 | if (!scope.ok()) return; |
1352 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1353 | if (!scope.ok()) return; |
1354 | auto _optimizations = ::tensorflow::ops::AsNodeOut(scope, optimizations); |
1355 | if (!scope.ok()) return; |
1356 | ::tensorflow::Node* ret; |
1357 | const auto unique_name = scope.GetUniqueNameForOp("OptimizeDataset" ); |
1358 | auto builder = ::tensorflow::NodeBuilder(unique_name, "OptimizeDataset" ) |
1359 | .Input(_input_dataset) |
1360 | .Input(_optimizations) |
1361 | .Attr("output_types" , output_types) |
1362 | .Attr("output_shapes" , output_shapes) |
1363 | .Attr("optimization_configs" , attrs.optimization_configs_) |
1364 | ; |
1365 | scope.UpdateBuilder(&builder); |
1366 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1367 | if (!scope.ok()) return; |
1368 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1369 | this->operation = Operation(ret); |
1370 | this->handle = Output(ret, 0); |
1371 | } |
1372 | |
1373 | OptimizeDataset::OptimizeDataset(const ::tensorflow::Scope& scope, |
1374 | ::tensorflow::Input input_dataset, |
1375 | ::tensorflow::Input optimizations, const |
1376 | DataTypeSlice& output_types, const |
1377 | gtl::ArraySlice<PartialTensorShape>& |
1378 | output_shapes) |
1379 | : OptimizeDataset(scope, input_dataset, optimizations, output_types, output_shapes, OptimizeDataset::Attrs()) {} |
1380 | |
1381 | OptimizeDatasetV2::OptimizeDatasetV2(const ::tensorflow::Scope& scope, |
1382 | ::tensorflow::Input input_dataset, |
1383 | ::tensorflow::Input optimizations_enabled, |
1384 | ::tensorflow::Input |
1385 | optimizations_disabled, |
1386 | ::tensorflow::Input optimizations_default, |
1387 | const DataTypeSlice& output_types, const |
1388 | gtl::ArraySlice<PartialTensorShape>& |
1389 | output_shapes, const |
1390 | OptimizeDatasetV2::Attrs& attrs) { |
1391 | if (!scope.ok()) return; |
1392 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1393 | if (!scope.ok()) return; |
1394 | auto _optimizations_enabled = ::tensorflow::ops::AsNodeOut(scope, optimizations_enabled); |
1395 | if (!scope.ok()) return; |
1396 | auto _optimizations_disabled = ::tensorflow::ops::AsNodeOut(scope, optimizations_disabled); |
1397 | if (!scope.ok()) return; |
1398 | auto _optimizations_default = ::tensorflow::ops::AsNodeOut(scope, optimizations_default); |
1399 | if (!scope.ok()) return; |
1400 | ::tensorflow::Node* ret; |
1401 | const auto unique_name = scope.GetUniqueNameForOp("OptimizeDatasetV2" ); |
1402 | auto builder = ::tensorflow::NodeBuilder(unique_name, "OptimizeDatasetV2" ) |
1403 | .Input(_input_dataset) |
1404 | .Input(_optimizations_enabled) |
1405 | .Input(_optimizations_disabled) |
1406 | .Input(_optimizations_default) |
1407 | .Attr("output_types" , output_types) |
1408 | .Attr("output_shapes" , output_shapes) |
1409 | .Attr("optimization_configs" , attrs.optimization_configs_) |
1410 | ; |
1411 | scope.UpdateBuilder(&builder); |
1412 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1413 | if (!scope.ok()) return; |
1414 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1415 | this->operation = Operation(ret); |
1416 | this->handle = Output(ret, 0); |
1417 | } |
1418 | |
1419 | OptimizeDatasetV2::OptimizeDatasetV2(const ::tensorflow::Scope& scope, |
1420 | ::tensorflow::Input input_dataset, |
1421 | ::tensorflow::Input optimizations_enabled, |
1422 | ::tensorflow::Input |
1423 | optimizations_disabled, |
1424 | ::tensorflow::Input optimizations_default, |
1425 | const DataTypeSlice& output_types, const |
1426 | gtl::ArraySlice<PartialTensorShape>& |
1427 | output_shapes) |
1428 | : OptimizeDatasetV2(scope, input_dataset, optimizations_enabled, optimizations_disabled, optimizations_default, output_types, output_shapes, OptimizeDatasetV2::Attrs()) {} |
1429 | |
1430 | OptionsDataset::OptionsDataset(const ::tensorflow::Scope& scope, |
1431 | ::tensorflow::Input input_dataset, StringPiece |
1432 | serialized_options, const DataTypeSlice& |
1433 | output_types, const |
1434 | gtl::ArraySlice<PartialTensorShape>& |
1435 | output_shapes, const OptionsDataset::Attrs& |
1436 | attrs) { |
1437 | if (!scope.ok()) return; |
1438 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1439 | if (!scope.ok()) return; |
1440 | ::tensorflow::Node* ret; |
1441 | const auto unique_name = scope.GetUniqueNameForOp("OptionsDataset" ); |
1442 | auto builder = ::tensorflow::NodeBuilder(unique_name, "OptionsDataset" ) |
1443 | .Input(_input_dataset) |
1444 | .Attr("serialized_options" , serialized_options) |
1445 | .Attr("output_types" , output_types) |
1446 | .Attr("output_shapes" , output_shapes) |
1447 | .Attr("metadata" , attrs.metadata_) |
1448 | ; |
1449 | scope.UpdateBuilder(&builder); |
1450 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1451 | if (!scope.ok()) return; |
1452 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1453 | this->operation = Operation(ret); |
1454 | this->handle = Output(ret, 0); |
1455 | } |
1456 | |
1457 | OptionsDataset::OptionsDataset(const ::tensorflow::Scope& scope, |
1458 | ::tensorflow::Input input_dataset, StringPiece |
1459 | serialized_options, const DataTypeSlice& |
1460 | output_types, const |
1461 | gtl::ArraySlice<PartialTensorShape>& |
1462 | output_shapes) |
1463 | : OptionsDataset(scope, input_dataset, serialized_options, output_types, output_shapes, OptionsDataset::Attrs()) {} |
1464 | |
1465 | PaddedBatchDataset::PaddedBatchDataset(const ::tensorflow::Scope& scope, |
1466 | ::tensorflow::Input input_dataset, |
1467 | ::tensorflow::Input batch_size, |
1468 | ::tensorflow::InputList padded_shapes, |
1469 | ::tensorflow::InputList padding_values, |
1470 | const |
1471 | gtl::ArraySlice<PartialTensorShape>& |
1472 | output_shapes, const |
1473 | PaddedBatchDataset::Attrs& attrs) { |
1474 | if (!scope.ok()) return; |
1475 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1476 | if (!scope.ok()) return; |
1477 | auto _batch_size = ::tensorflow::ops::AsNodeOut(scope, batch_size); |
1478 | if (!scope.ok()) return; |
1479 | auto _padded_shapes = ::tensorflow::ops::AsNodeOutList(scope, padded_shapes); |
1480 | if (!scope.ok()) return; |
1481 | auto _padding_values = ::tensorflow::ops::AsNodeOutList(scope, padding_values); |
1482 | if (!scope.ok()) return; |
1483 | ::tensorflow::Node* ret; |
1484 | const auto unique_name = scope.GetUniqueNameForOp("PaddedBatchDataset" ); |
1485 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PaddedBatchDataset" ) |
1486 | .Input(_input_dataset) |
1487 | .Input(_batch_size) |
1488 | .Input(_padded_shapes) |
1489 | .Input(_padding_values) |
1490 | .Attr("output_shapes" , output_shapes) |
1491 | .Attr("metadata" , attrs.metadata_) |
1492 | ; |
1493 | scope.UpdateBuilder(&builder); |
1494 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1495 | if (!scope.ok()) return; |
1496 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1497 | this->operation = Operation(ret); |
1498 | this->handle = Output(ret, 0); |
1499 | } |
1500 | |
1501 | PaddedBatchDataset::PaddedBatchDataset(const ::tensorflow::Scope& scope, |
1502 | ::tensorflow::Input input_dataset, |
1503 | ::tensorflow::Input batch_size, |
1504 | ::tensorflow::InputList padded_shapes, |
1505 | ::tensorflow::InputList padding_values, |
1506 | const |
1507 | gtl::ArraySlice<PartialTensorShape>& |
1508 | output_shapes) |
1509 | : PaddedBatchDataset(scope, input_dataset, batch_size, padded_shapes, padding_values, output_shapes, PaddedBatchDataset::Attrs()) {} |
1510 | |
1511 | PaddedBatchDatasetV2::PaddedBatchDatasetV2(const ::tensorflow::Scope& scope, |
1512 | ::tensorflow::Input input_dataset, |
1513 | ::tensorflow::Input batch_size, |
1514 | ::tensorflow::InputList |
1515 | padded_shapes, |
1516 | ::tensorflow::InputList |
1517 | padding_values, ::tensorflow::Input |
1518 | drop_remainder, const |
1519 | gtl::ArraySlice<PartialTensorShape>& |
1520 | output_shapes, const |
1521 | PaddedBatchDatasetV2::Attrs& attrs) { |
1522 | if (!scope.ok()) return; |
1523 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1524 | if (!scope.ok()) return; |
1525 | auto _batch_size = ::tensorflow::ops::AsNodeOut(scope, batch_size); |
1526 | if (!scope.ok()) return; |
1527 | auto _padded_shapes = ::tensorflow::ops::AsNodeOutList(scope, padded_shapes); |
1528 | if (!scope.ok()) return; |
1529 | auto _padding_values = ::tensorflow::ops::AsNodeOutList(scope, padding_values); |
1530 | if (!scope.ok()) return; |
1531 | auto _drop_remainder = ::tensorflow::ops::AsNodeOut(scope, drop_remainder); |
1532 | if (!scope.ok()) return; |
1533 | ::tensorflow::Node* ret; |
1534 | const auto unique_name = scope.GetUniqueNameForOp("PaddedBatchDatasetV2" ); |
1535 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PaddedBatchDatasetV2" ) |
1536 | .Input(_input_dataset) |
1537 | .Input(_batch_size) |
1538 | .Input(_padded_shapes) |
1539 | .Input(_padding_values) |
1540 | .Input(_drop_remainder) |
1541 | .Attr("parallel_copy" , attrs.parallel_copy_) |
1542 | .Attr("output_shapes" , output_shapes) |
1543 | .Attr("metadata" , attrs.metadata_) |
1544 | ; |
1545 | scope.UpdateBuilder(&builder); |
1546 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1547 | if (!scope.ok()) return; |
1548 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1549 | this->operation = Operation(ret); |
1550 | this->handle = Output(ret, 0); |
1551 | } |
1552 | |
1553 | PaddedBatchDatasetV2::PaddedBatchDatasetV2(const ::tensorflow::Scope& scope, |
1554 | ::tensorflow::Input input_dataset, |
1555 | ::tensorflow::Input batch_size, |
1556 | ::tensorflow::InputList |
1557 | padded_shapes, |
1558 | ::tensorflow::InputList |
1559 | padding_values, ::tensorflow::Input |
1560 | drop_remainder, const |
1561 | gtl::ArraySlice<PartialTensorShape>& |
1562 | output_shapes) |
1563 | : PaddedBatchDatasetV2(scope, input_dataset, batch_size, padded_shapes, padding_values, drop_remainder, output_shapes, PaddedBatchDatasetV2::Attrs()) {} |
1564 | |
1565 | ParallelBatchDataset::ParallelBatchDataset(const ::tensorflow::Scope& scope, |
1566 | ::tensorflow::Input input_dataset, |
1567 | ::tensorflow::Input batch_size, |
1568 | ::tensorflow::Input |
1569 | num_parallel_calls, |
1570 | ::tensorflow::Input drop_remainder, |
1571 | const DataTypeSlice& output_types, |
1572 | const |
1573 | gtl::ArraySlice<PartialTensorShape>& |
1574 | output_shapes, const |
1575 | ParallelBatchDataset::Attrs& attrs) { |
1576 | if (!scope.ok()) return; |
1577 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1578 | if (!scope.ok()) return; |
1579 | auto _batch_size = ::tensorflow::ops::AsNodeOut(scope, batch_size); |
1580 | if (!scope.ok()) return; |
1581 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1582 | if (!scope.ok()) return; |
1583 | auto _drop_remainder = ::tensorflow::ops::AsNodeOut(scope, drop_remainder); |
1584 | if (!scope.ok()) return; |
1585 | ::tensorflow::Node* ret; |
1586 | const auto unique_name = scope.GetUniqueNameForOp("ParallelBatchDataset" ); |
1587 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelBatchDataset" ) |
1588 | .Input(_input_dataset) |
1589 | .Input(_batch_size) |
1590 | .Input(_num_parallel_calls) |
1591 | .Input(_drop_remainder) |
1592 | .Attr("parallel_copy" , attrs.parallel_copy_) |
1593 | .Attr("output_types" , output_types) |
1594 | .Attr("output_shapes" , output_shapes) |
1595 | .Attr("deterministic" , attrs.deterministic_) |
1596 | .Attr("metadata" , attrs.metadata_) |
1597 | ; |
1598 | scope.UpdateBuilder(&builder); |
1599 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1600 | if (!scope.ok()) return; |
1601 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1602 | this->operation = Operation(ret); |
1603 | this->handle = Output(ret, 0); |
1604 | } |
1605 | |
1606 | ParallelBatchDataset::ParallelBatchDataset(const ::tensorflow::Scope& scope, |
1607 | ::tensorflow::Input input_dataset, |
1608 | ::tensorflow::Input batch_size, |
1609 | ::tensorflow::Input |
1610 | num_parallel_calls, |
1611 | ::tensorflow::Input drop_remainder, |
1612 | const DataTypeSlice& output_types, |
1613 | const |
1614 | gtl::ArraySlice<PartialTensorShape>& |
1615 | output_shapes) |
1616 | : ParallelBatchDataset(scope, input_dataset, batch_size, num_parallel_calls, drop_remainder, output_types, output_shapes, ParallelBatchDataset::Attrs()) {} |
1617 | |
1618 | ParallelFilterDataset::ParallelFilterDataset(const ::tensorflow::Scope& scope, |
1619 | ::tensorflow::Input input_dataset, |
1620 | ::tensorflow::InputList |
1621 | other_arguments, |
1622 | ::tensorflow::Input |
1623 | num_parallel_calls, const |
1624 | NameAttrList& predicate, const |
1625 | DataTypeSlice& output_types, const |
1626 | gtl::ArraySlice<PartialTensorShape>& |
1627 | output_shapes, const |
1628 | ParallelFilterDataset::Attrs& |
1629 | attrs) { |
1630 | if (!scope.ok()) return; |
1631 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1632 | if (!scope.ok()) return; |
1633 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1634 | if (!scope.ok()) return; |
1635 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1636 | if (!scope.ok()) return; |
1637 | ::tensorflow::Node* ret; |
1638 | const auto unique_name = scope.GetUniqueNameForOp("ParallelFilterDataset" ); |
1639 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelFilterDataset" ) |
1640 | .Input(_input_dataset) |
1641 | .Input(_other_arguments) |
1642 | .Input(_num_parallel_calls) |
1643 | .Attr("predicate" , predicate) |
1644 | .Attr("deterministic" , attrs.deterministic_) |
1645 | .Attr("output_types" , output_types) |
1646 | .Attr("output_shapes" , output_shapes) |
1647 | .Attr("metadata" , attrs.metadata_) |
1648 | ; |
1649 | scope.UpdateBuilder(&builder); |
1650 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1651 | if (!scope.ok()) return; |
1652 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1653 | this->operation = Operation(ret); |
1654 | this->handle = Output(ret, 0); |
1655 | } |
1656 | |
1657 | ParallelFilterDataset::ParallelFilterDataset(const ::tensorflow::Scope& scope, |
1658 | ::tensorflow::Input input_dataset, |
1659 | ::tensorflow::InputList |
1660 | other_arguments, |
1661 | ::tensorflow::Input |
1662 | num_parallel_calls, const |
1663 | NameAttrList& predicate, const |
1664 | DataTypeSlice& output_types, const |
1665 | gtl::ArraySlice<PartialTensorShape>& |
1666 | output_shapes) |
1667 | : ParallelFilterDataset(scope, input_dataset, other_arguments, num_parallel_calls, predicate, output_types, output_shapes, ParallelFilterDataset::Attrs()) {} |
1668 | |
1669 | ParallelInterleaveDatasetV2::ParallelInterleaveDatasetV2(const |
1670 | ::tensorflow::Scope& |
1671 | scope, |
1672 | ::tensorflow::Input |
1673 | input_dataset, |
1674 | ::tensorflow::InputList |
1675 | other_arguments, |
1676 | ::tensorflow::Input |
1677 | cycle_length, |
1678 | ::tensorflow::Input |
1679 | block_length, |
1680 | ::tensorflow::Input |
1681 | num_parallel_calls, |
1682 | const NameAttrList& f, |
1683 | const DataTypeSlice& |
1684 | output_types, const |
1685 | gtl::ArraySlice<PartialTensorShape>& |
1686 | output_shapes, const |
1687 | ParallelInterleaveDatasetV2::Attrs& |
1688 | attrs) { |
1689 | if (!scope.ok()) return; |
1690 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1691 | if (!scope.ok()) return; |
1692 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1693 | if (!scope.ok()) return; |
1694 | auto _cycle_length = ::tensorflow::ops::AsNodeOut(scope, cycle_length); |
1695 | if (!scope.ok()) return; |
1696 | auto _block_length = ::tensorflow::ops::AsNodeOut(scope, block_length); |
1697 | if (!scope.ok()) return; |
1698 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1699 | if (!scope.ok()) return; |
1700 | ::tensorflow::Node* ret; |
1701 | const auto unique_name = scope.GetUniqueNameForOp("ParallelInterleaveDatasetV2" ); |
1702 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelInterleaveDatasetV2" ) |
1703 | .Input(_input_dataset) |
1704 | .Input(_other_arguments) |
1705 | .Input(_cycle_length) |
1706 | .Input(_block_length) |
1707 | .Input(_num_parallel_calls) |
1708 | .Attr("f" , f) |
1709 | .Attr("output_types" , output_types) |
1710 | .Attr("output_shapes" , output_shapes) |
1711 | .Attr("sloppy" , attrs.sloppy_) |
1712 | .Attr("metadata" , attrs.metadata_) |
1713 | ; |
1714 | scope.UpdateBuilder(&builder); |
1715 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1716 | if (!scope.ok()) return; |
1717 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1718 | this->operation = Operation(ret); |
1719 | this->handle = Output(ret, 0); |
1720 | } |
1721 | |
1722 | ParallelInterleaveDatasetV2::ParallelInterleaveDatasetV2(const |
1723 | ::tensorflow::Scope& |
1724 | scope, |
1725 | ::tensorflow::Input |
1726 | input_dataset, |
1727 | ::tensorflow::InputList |
1728 | other_arguments, |
1729 | ::tensorflow::Input |
1730 | cycle_length, |
1731 | ::tensorflow::Input |
1732 | block_length, |
1733 | ::tensorflow::Input |
1734 | num_parallel_calls, |
1735 | const NameAttrList& f, |
1736 | const DataTypeSlice& |
1737 | output_types, const |
1738 | gtl::ArraySlice<PartialTensorShape>& |
1739 | output_shapes) |
1740 | : ParallelInterleaveDatasetV2(scope, input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, f, output_types, output_shapes, ParallelInterleaveDatasetV2::Attrs()) {} |
1741 | |
1742 | ParallelInterleaveDatasetV3::ParallelInterleaveDatasetV3(const |
1743 | ::tensorflow::Scope& |
1744 | scope, |
1745 | ::tensorflow::Input |
1746 | input_dataset, |
1747 | ::tensorflow::InputList |
1748 | other_arguments, |
1749 | ::tensorflow::Input |
1750 | cycle_length, |
1751 | ::tensorflow::Input |
1752 | block_length, |
1753 | ::tensorflow::Input |
1754 | num_parallel_calls, |
1755 | const NameAttrList& f, |
1756 | const DataTypeSlice& |
1757 | output_types, const |
1758 | gtl::ArraySlice<PartialTensorShape>& |
1759 | output_shapes, const |
1760 | ParallelInterleaveDatasetV3::Attrs& |
1761 | attrs) { |
1762 | if (!scope.ok()) return; |
1763 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1764 | if (!scope.ok()) return; |
1765 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1766 | if (!scope.ok()) return; |
1767 | auto _cycle_length = ::tensorflow::ops::AsNodeOut(scope, cycle_length); |
1768 | if (!scope.ok()) return; |
1769 | auto _block_length = ::tensorflow::ops::AsNodeOut(scope, block_length); |
1770 | if (!scope.ok()) return; |
1771 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1772 | if (!scope.ok()) return; |
1773 | ::tensorflow::Node* ret; |
1774 | const auto unique_name = scope.GetUniqueNameForOp("ParallelInterleaveDatasetV3" ); |
1775 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelInterleaveDatasetV3" ) |
1776 | .Input(_input_dataset) |
1777 | .Input(_other_arguments) |
1778 | .Input(_cycle_length) |
1779 | .Input(_block_length) |
1780 | .Input(_num_parallel_calls) |
1781 | .Attr("f" , f) |
1782 | .Attr("deterministic" , attrs.deterministic_) |
1783 | .Attr("output_types" , output_types) |
1784 | .Attr("output_shapes" , output_shapes) |
1785 | .Attr("metadata" , attrs.metadata_) |
1786 | ; |
1787 | scope.UpdateBuilder(&builder); |
1788 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1789 | if (!scope.ok()) return; |
1790 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1791 | this->operation = Operation(ret); |
1792 | this->handle = Output(ret, 0); |
1793 | } |
1794 | |
1795 | ParallelInterleaveDatasetV3::ParallelInterleaveDatasetV3(const |
1796 | ::tensorflow::Scope& |
1797 | scope, |
1798 | ::tensorflow::Input |
1799 | input_dataset, |
1800 | ::tensorflow::InputList |
1801 | other_arguments, |
1802 | ::tensorflow::Input |
1803 | cycle_length, |
1804 | ::tensorflow::Input |
1805 | block_length, |
1806 | ::tensorflow::Input |
1807 | num_parallel_calls, |
1808 | const NameAttrList& f, |
1809 | const DataTypeSlice& |
1810 | output_types, const |
1811 | gtl::ArraySlice<PartialTensorShape>& |
1812 | output_shapes) |
1813 | : ParallelInterleaveDatasetV3(scope, input_dataset, other_arguments, cycle_length, block_length, num_parallel_calls, f, output_types, output_shapes, ParallelInterleaveDatasetV3::Attrs()) {} |
1814 | |
1815 | ParallelInterleaveDatasetV4::ParallelInterleaveDatasetV4(const |
1816 | ::tensorflow::Scope& |
1817 | scope, |
1818 | ::tensorflow::Input |
1819 | input_dataset, |
1820 | ::tensorflow::InputList |
1821 | other_arguments, |
1822 | ::tensorflow::Input |
1823 | cycle_length, |
1824 | ::tensorflow::Input |
1825 | block_length, |
1826 | ::tensorflow::Input |
1827 | buffer_output_elements, |
1828 | ::tensorflow::Input |
1829 | prefetch_input_elements, |
1830 | ::tensorflow::Input |
1831 | num_parallel_calls, |
1832 | const NameAttrList& f, |
1833 | const DataTypeSlice& |
1834 | output_types, const |
1835 | gtl::ArraySlice<PartialTensorShape>& |
1836 | output_shapes, const |
1837 | ParallelInterleaveDatasetV4::Attrs& |
1838 | attrs) { |
1839 | if (!scope.ok()) return; |
1840 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1841 | if (!scope.ok()) return; |
1842 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1843 | if (!scope.ok()) return; |
1844 | auto _cycle_length = ::tensorflow::ops::AsNodeOut(scope, cycle_length); |
1845 | if (!scope.ok()) return; |
1846 | auto _block_length = ::tensorflow::ops::AsNodeOut(scope, block_length); |
1847 | if (!scope.ok()) return; |
1848 | auto _buffer_output_elements = ::tensorflow::ops::AsNodeOut(scope, buffer_output_elements); |
1849 | if (!scope.ok()) return; |
1850 | auto _prefetch_input_elements = ::tensorflow::ops::AsNodeOut(scope, prefetch_input_elements); |
1851 | if (!scope.ok()) return; |
1852 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1853 | if (!scope.ok()) return; |
1854 | ::tensorflow::Node* ret; |
1855 | const auto unique_name = scope.GetUniqueNameForOp("ParallelInterleaveDatasetV4" ); |
1856 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelInterleaveDatasetV4" ) |
1857 | .Input(_input_dataset) |
1858 | .Input(_other_arguments) |
1859 | .Input(_cycle_length) |
1860 | .Input(_block_length) |
1861 | .Input(_buffer_output_elements) |
1862 | .Input(_prefetch_input_elements) |
1863 | .Input(_num_parallel_calls) |
1864 | .Attr("f" , f) |
1865 | .Attr("deterministic" , attrs.deterministic_) |
1866 | .Attr("output_types" , output_types) |
1867 | .Attr("output_shapes" , output_shapes) |
1868 | .Attr("metadata" , attrs.metadata_) |
1869 | ; |
1870 | scope.UpdateBuilder(&builder); |
1871 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1872 | if (!scope.ok()) return; |
1873 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1874 | this->operation = Operation(ret); |
1875 | this->handle = Output(ret, 0); |
1876 | } |
1877 | |
1878 | ParallelInterleaveDatasetV4::ParallelInterleaveDatasetV4(const |
1879 | ::tensorflow::Scope& |
1880 | scope, |
1881 | ::tensorflow::Input |
1882 | input_dataset, |
1883 | ::tensorflow::InputList |
1884 | other_arguments, |
1885 | ::tensorflow::Input |
1886 | cycle_length, |
1887 | ::tensorflow::Input |
1888 | block_length, |
1889 | ::tensorflow::Input |
1890 | buffer_output_elements, |
1891 | ::tensorflow::Input |
1892 | prefetch_input_elements, |
1893 | ::tensorflow::Input |
1894 | num_parallel_calls, |
1895 | const NameAttrList& f, |
1896 | const DataTypeSlice& |
1897 | output_types, const |
1898 | gtl::ArraySlice<PartialTensorShape>& |
1899 | output_shapes) |
1900 | : ParallelInterleaveDatasetV4(scope, input_dataset, other_arguments, cycle_length, block_length, buffer_output_elements, prefetch_input_elements, num_parallel_calls, f, output_types, output_shapes, ParallelInterleaveDatasetV4::Attrs()) {} |
1901 | |
1902 | ParallelMapDataset::ParallelMapDataset(const ::tensorflow::Scope& scope, |
1903 | ::tensorflow::Input input_dataset, |
1904 | ::tensorflow::InputList other_arguments, |
1905 | ::tensorflow::Input num_parallel_calls, |
1906 | const NameAttrList& f, const |
1907 | DataTypeSlice& output_types, const |
1908 | gtl::ArraySlice<PartialTensorShape>& |
1909 | output_shapes, const |
1910 | ParallelMapDataset::Attrs& attrs) { |
1911 | if (!scope.ok()) return; |
1912 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1913 | if (!scope.ok()) return; |
1914 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1915 | if (!scope.ok()) return; |
1916 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1917 | if (!scope.ok()) return; |
1918 | ::tensorflow::Node* ret; |
1919 | const auto unique_name = scope.GetUniqueNameForOp("ParallelMapDataset" ); |
1920 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelMapDataset" ) |
1921 | .Input(_input_dataset) |
1922 | .Input(_other_arguments) |
1923 | .Input(_num_parallel_calls) |
1924 | .Attr("f" , f) |
1925 | .Attr("output_types" , output_types) |
1926 | .Attr("output_shapes" , output_shapes) |
1927 | .Attr("use_inter_op_parallelism" , attrs.use_inter_op_parallelism_) |
1928 | .Attr("sloppy" , attrs.sloppy_) |
1929 | .Attr("preserve_cardinality" , attrs.preserve_cardinality_) |
1930 | .Attr("metadata" , attrs.metadata_) |
1931 | ; |
1932 | scope.UpdateBuilder(&builder); |
1933 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1934 | if (!scope.ok()) return; |
1935 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1936 | this->operation = Operation(ret); |
1937 | this->handle = Output(ret, 0); |
1938 | } |
1939 | |
1940 | ParallelMapDataset::ParallelMapDataset(const ::tensorflow::Scope& scope, |
1941 | ::tensorflow::Input input_dataset, |
1942 | ::tensorflow::InputList other_arguments, |
1943 | ::tensorflow::Input num_parallel_calls, |
1944 | const NameAttrList& f, const |
1945 | DataTypeSlice& output_types, const |
1946 | gtl::ArraySlice<PartialTensorShape>& |
1947 | output_shapes) |
1948 | : ParallelMapDataset(scope, input_dataset, other_arguments, num_parallel_calls, f, output_types, output_shapes, ParallelMapDataset::Attrs()) {} |
1949 | |
1950 | ParallelMapDatasetV2::ParallelMapDatasetV2(const ::tensorflow::Scope& scope, |
1951 | ::tensorflow::Input input_dataset, |
1952 | ::tensorflow::InputList |
1953 | other_arguments, ::tensorflow::Input |
1954 | num_parallel_calls, const |
1955 | NameAttrList& f, const |
1956 | DataTypeSlice& output_types, const |
1957 | gtl::ArraySlice<PartialTensorShape>& |
1958 | output_shapes, const |
1959 | ParallelMapDatasetV2::Attrs& attrs) { |
1960 | if (!scope.ok()) return; |
1961 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
1962 | if (!scope.ok()) return; |
1963 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
1964 | if (!scope.ok()) return; |
1965 | auto _num_parallel_calls = ::tensorflow::ops::AsNodeOut(scope, num_parallel_calls); |
1966 | if (!scope.ok()) return; |
1967 | ::tensorflow::Node* ret; |
1968 | const auto unique_name = scope.GetUniqueNameForOp("ParallelMapDatasetV2" ); |
1969 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelMapDatasetV2" ) |
1970 | .Input(_input_dataset) |
1971 | .Input(_other_arguments) |
1972 | .Input(_num_parallel_calls) |
1973 | .Attr("f" , f) |
1974 | .Attr("output_types" , output_types) |
1975 | .Attr("output_shapes" , output_shapes) |
1976 | .Attr("use_inter_op_parallelism" , attrs.use_inter_op_parallelism_) |
1977 | .Attr("deterministic" , attrs.deterministic_) |
1978 | .Attr("preserve_cardinality" , attrs.preserve_cardinality_) |
1979 | .Attr("metadata" , attrs.metadata_) |
1980 | ; |
1981 | scope.UpdateBuilder(&builder); |
1982 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1983 | if (!scope.ok()) return; |
1984 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1985 | this->operation = Operation(ret); |
1986 | this->handle = Output(ret, 0); |
1987 | } |
1988 | |
1989 | ParallelMapDatasetV2::ParallelMapDatasetV2(const ::tensorflow::Scope& scope, |
1990 | ::tensorflow::Input input_dataset, |
1991 | ::tensorflow::InputList |
1992 | other_arguments, ::tensorflow::Input |
1993 | num_parallel_calls, const |
1994 | NameAttrList& f, const |
1995 | DataTypeSlice& output_types, const |
1996 | gtl::ArraySlice<PartialTensorShape>& |
1997 | output_shapes) |
1998 | : ParallelMapDatasetV2(scope, input_dataset, other_arguments, num_parallel_calls, f, output_types, output_shapes, ParallelMapDatasetV2::Attrs()) {} |
1999 | |
2000 | PrefetchDataset::PrefetchDataset(const ::tensorflow::Scope& scope, |
2001 | ::tensorflow::Input input_dataset, |
2002 | ::tensorflow::Input buffer_size, const |
2003 | DataTypeSlice& output_types, const |
2004 | gtl::ArraySlice<PartialTensorShape>& |
2005 | output_shapes, const PrefetchDataset::Attrs& |
2006 | attrs) { |
2007 | if (!scope.ok()) return; |
2008 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2009 | if (!scope.ok()) return; |
2010 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2011 | if (!scope.ok()) return; |
2012 | ::tensorflow::Node* ret; |
2013 | const auto unique_name = scope.GetUniqueNameForOp("PrefetchDataset" ); |
2014 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PrefetchDataset" ) |
2015 | .Input(_input_dataset) |
2016 | .Input(_buffer_size) |
2017 | .Attr("output_types" , output_types) |
2018 | .Attr("output_shapes" , output_shapes) |
2019 | .Attr("slack_period" , attrs.slack_period_) |
2020 | .Attr("legacy_autotune" , attrs.legacy_autotune_) |
2021 | .Attr("buffer_size_min" , attrs.buffer_size_min_) |
2022 | .Attr("metadata" , attrs.metadata_) |
2023 | ; |
2024 | scope.UpdateBuilder(&builder); |
2025 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2026 | if (!scope.ok()) return; |
2027 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2028 | this->operation = Operation(ret); |
2029 | this->handle = Output(ret, 0); |
2030 | } |
2031 | |
2032 | PrefetchDataset::PrefetchDataset(const ::tensorflow::Scope& scope, |
2033 | ::tensorflow::Input input_dataset, |
2034 | ::tensorflow::Input buffer_size, const |
2035 | DataTypeSlice& output_types, const |
2036 | gtl::ArraySlice<PartialTensorShape>& |
2037 | output_shapes) |
2038 | : PrefetchDataset(scope, input_dataset, buffer_size, output_types, output_shapes, PrefetchDataset::Attrs()) {} |
2039 | |
2040 | RangeDataset::RangeDataset(const ::tensorflow::Scope& scope, |
2041 | ::tensorflow::Input start, ::tensorflow::Input stop, |
2042 | ::tensorflow::Input step, const DataTypeSlice& |
2043 | output_types, const |
2044 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
2045 | const RangeDataset::Attrs& attrs) { |
2046 | if (!scope.ok()) return; |
2047 | auto _start = ::tensorflow::ops::AsNodeOut(scope, start); |
2048 | if (!scope.ok()) return; |
2049 | auto _stop = ::tensorflow::ops::AsNodeOut(scope, stop); |
2050 | if (!scope.ok()) return; |
2051 | auto _step = ::tensorflow::ops::AsNodeOut(scope, step); |
2052 | if (!scope.ok()) return; |
2053 | ::tensorflow::Node* ret; |
2054 | const auto unique_name = scope.GetUniqueNameForOp("RangeDataset" ); |
2055 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RangeDataset" ) |
2056 | .Input(_start) |
2057 | .Input(_stop) |
2058 | .Input(_step) |
2059 | .Attr("output_types" , output_types) |
2060 | .Attr("output_shapes" , output_shapes) |
2061 | .Attr("metadata" , attrs.metadata_) |
2062 | .Attr("replicate_on_split" , attrs.replicate_on_split_) |
2063 | ; |
2064 | scope.UpdateBuilder(&builder); |
2065 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2066 | if (!scope.ok()) return; |
2067 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2068 | this->operation = Operation(ret); |
2069 | this->handle = Output(ret, 0); |
2070 | } |
2071 | |
2072 | RangeDataset::RangeDataset(const ::tensorflow::Scope& scope, |
2073 | ::tensorflow::Input start, ::tensorflow::Input stop, |
2074 | ::tensorflow::Input step, const DataTypeSlice& |
2075 | output_types, const |
2076 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
2077 | : RangeDataset(scope, start, stop, step, output_types, output_shapes, RangeDataset::Attrs()) {} |
2078 | |
2079 | ReduceDataset::ReduceDataset(const ::tensorflow::Scope& scope, |
2080 | ::tensorflow::Input input_dataset, |
2081 | ::tensorflow::InputList initial_state, |
2082 | ::tensorflow::InputList other_arguments, const |
2083 | NameAttrList& f, const DataTypeSlice& |
2084 | output_types, const |
2085 | gtl::ArraySlice<PartialTensorShape>& |
2086 | output_shapes, const ReduceDataset::Attrs& attrs) { |
2087 | if (!scope.ok()) return; |
2088 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2089 | if (!scope.ok()) return; |
2090 | auto _initial_state = ::tensorflow::ops::AsNodeOutList(scope, initial_state); |
2091 | if (!scope.ok()) return; |
2092 | auto _other_arguments = ::tensorflow::ops::AsNodeOutList(scope, other_arguments); |
2093 | if (!scope.ok()) return; |
2094 | ::tensorflow::Node* ret; |
2095 | const auto unique_name = scope.GetUniqueNameForOp("ReduceDataset" ); |
2096 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReduceDataset" ) |
2097 | .Input(_input_dataset) |
2098 | .Input(_initial_state) |
2099 | .Input(_other_arguments) |
2100 | .Attr("f" , f) |
2101 | .Attr("output_types" , output_types) |
2102 | .Attr("output_shapes" , output_shapes) |
2103 | .Attr("use_inter_op_parallelism" , attrs.use_inter_op_parallelism_) |
2104 | .Attr("metadata" , attrs.metadata_) |
2105 | ; |
2106 | scope.UpdateBuilder(&builder); |
2107 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2108 | if (!scope.ok()) return; |
2109 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2110 | this->operation = Operation(ret); |
2111 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
2112 | this->components.push_back(Output(ret, i)); |
2113 | } |
2114 | |
2115 | ReduceDataset::ReduceDataset(const ::tensorflow::Scope& scope, |
2116 | ::tensorflow::Input input_dataset, |
2117 | ::tensorflow::InputList initial_state, |
2118 | ::tensorflow::InputList other_arguments, const |
2119 | NameAttrList& f, const DataTypeSlice& |
2120 | output_types, const |
2121 | gtl::ArraySlice<PartialTensorShape>& |
2122 | output_shapes) |
2123 | : ReduceDataset(scope, input_dataset, initial_state, other_arguments, f, output_types, output_shapes, ReduceDataset::Attrs()) {} |
2124 | |
2125 | RepeatDataset::RepeatDataset(const ::tensorflow::Scope& scope, |
2126 | ::tensorflow::Input input_dataset, |
2127 | ::tensorflow::Input count, const DataTypeSlice& |
2128 | output_types, const |
2129 | gtl::ArraySlice<PartialTensorShape>& |
2130 | output_shapes, const RepeatDataset::Attrs& attrs) { |
2131 | if (!scope.ok()) return; |
2132 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2133 | if (!scope.ok()) return; |
2134 | auto _count = ::tensorflow::ops::AsNodeOut(scope, count); |
2135 | if (!scope.ok()) return; |
2136 | ::tensorflow::Node* ret; |
2137 | const auto unique_name = scope.GetUniqueNameForOp("RepeatDataset" ); |
2138 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RepeatDataset" ) |
2139 | .Input(_input_dataset) |
2140 | .Input(_count) |
2141 | .Attr("output_types" , output_types) |
2142 | .Attr("output_shapes" , output_shapes) |
2143 | .Attr("metadata" , attrs.metadata_) |
2144 | ; |
2145 | scope.UpdateBuilder(&builder); |
2146 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2147 | if (!scope.ok()) return; |
2148 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2149 | this->operation = Operation(ret); |
2150 | this->handle = Output(ret, 0); |
2151 | } |
2152 | |
2153 | RepeatDataset::RepeatDataset(const ::tensorflow::Scope& scope, |
2154 | ::tensorflow::Input input_dataset, |
2155 | ::tensorflow::Input count, const DataTypeSlice& |
2156 | output_types, const |
2157 | gtl::ArraySlice<PartialTensorShape>& |
2158 | output_shapes) |
2159 | : RepeatDataset(scope, input_dataset, count, output_types, output_shapes, RepeatDataset::Attrs()) {} |
2160 | |
2161 | RewriteDataset::RewriteDataset(const ::tensorflow::Scope& scope, |
2162 | ::tensorflow::Input input_dataset, |
2163 | ::tensorflow::Input rewrite_name, const |
2164 | DataTypeSlice& output_types, const |
2165 | gtl::ArraySlice<PartialTensorShape>& |
2166 | output_shapes) { |
2167 | if (!scope.ok()) return; |
2168 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2169 | if (!scope.ok()) return; |
2170 | auto _rewrite_name = ::tensorflow::ops::AsNodeOut(scope, rewrite_name); |
2171 | if (!scope.ok()) return; |
2172 | ::tensorflow::Node* ret; |
2173 | const auto unique_name = scope.GetUniqueNameForOp("RewriteDataset" ); |
2174 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RewriteDataset" ) |
2175 | .Input(_input_dataset) |
2176 | .Input(_rewrite_name) |
2177 | .Attr("output_types" , output_types) |
2178 | .Attr("output_shapes" , output_shapes) |
2179 | ; |
2180 | scope.UpdateBuilder(&builder); |
2181 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2182 | if (!scope.ok()) return; |
2183 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2184 | this->operation = Operation(ret); |
2185 | this->handle = Output(ret, 0); |
2186 | } |
2187 | |
2188 | ShardDataset::ShardDataset(const ::tensorflow::Scope& scope, |
2189 | ::tensorflow::Input input_dataset, |
2190 | ::tensorflow::Input num_shards, ::tensorflow::Input |
2191 | index, const DataTypeSlice& output_types, const |
2192 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
2193 | const ShardDataset::Attrs& attrs) { |
2194 | if (!scope.ok()) return; |
2195 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2196 | if (!scope.ok()) return; |
2197 | auto _num_shards = ::tensorflow::ops::AsNodeOut(scope, num_shards); |
2198 | if (!scope.ok()) return; |
2199 | auto _index = ::tensorflow::ops::AsNodeOut(scope, index); |
2200 | if (!scope.ok()) return; |
2201 | ::tensorflow::Node* ret; |
2202 | const auto unique_name = scope.GetUniqueNameForOp("ShardDataset" ); |
2203 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShardDataset" ) |
2204 | .Input(_input_dataset) |
2205 | .Input(_num_shards) |
2206 | .Input(_index) |
2207 | .Attr("require_non_empty" , attrs.require_non_empty_) |
2208 | .Attr("output_types" , output_types) |
2209 | .Attr("output_shapes" , output_shapes) |
2210 | .Attr("metadata" , attrs.metadata_) |
2211 | ; |
2212 | scope.UpdateBuilder(&builder); |
2213 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2214 | if (!scope.ok()) return; |
2215 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2216 | this->operation = Operation(ret); |
2217 | this->handle = Output(ret, 0); |
2218 | } |
2219 | |
2220 | ShardDataset::ShardDataset(const ::tensorflow::Scope& scope, |
2221 | ::tensorflow::Input input_dataset, |
2222 | ::tensorflow::Input num_shards, ::tensorflow::Input |
2223 | index, const DataTypeSlice& output_types, const |
2224 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
2225 | : ShardDataset(scope, input_dataset, num_shards, index, output_types, output_shapes, ShardDataset::Attrs()) {} |
2226 | |
2227 | ShuffleAndRepeatDataset::ShuffleAndRepeatDataset(const ::tensorflow::Scope& |
2228 | scope, ::tensorflow::Input |
2229 | input_dataset, |
2230 | ::tensorflow::Input |
2231 | buffer_size, |
2232 | ::tensorflow::Input seed, |
2233 | ::tensorflow::Input seed2, |
2234 | ::tensorflow::Input count, |
2235 | const DataTypeSlice& |
2236 | output_types, const |
2237 | gtl::ArraySlice<PartialTensorShape>& |
2238 | output_shapes, const |
2239 | ShuffleAndRepeatDataset::Attrs& |
2240 | attrs) { |
2241 | if (!scope.ok()) return; |
2242 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2243 | if (!scope.ok()) return; |
2244 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2245 | if (!scope.ok()) return; |
2246 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
2247 | if (!scope.ok()) return; |
2248 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
2249 | if (!scope.ok()) return; |
2250 | auto _count = ::tensorflow::ops::AsNodeOut(scope, count); |
2251 | if (!scope.ok()) return; |
2252 | ::tensorflow::Node* ret; |
2253 | const auto unique_name = scope.GetUniqueNameForOp("ShuffleAndRepeatDataset" ); |
2254 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShuffleAndRepeatDataset" ) |
2255 | .Input(_input_dataset) |
2256 | .Input(_buffer_size) |
2257 | .Input(_seed) |
2258 | .Input(_seed2) |
2259 | .Input(_count) |
2260 | .Attr("output_types" , output_types) |
2261 | .Attr("output_shapes" , output_shapes) |
2262 | .Attr("reshuffle_each_iteration" , attrs.reshuffle_each_iteration_) |
2263 | .Attr("metadata" , attrs.metadata_) |
2264 | ; |
2265 | scope.UpdateBuilder(&builder); |
2266 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2267 | if (!scope.ok()) return; |
2268 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2269 | this->operation = Operation(ret); |
2270 | this->handle = Output(ret, 0); |
2271 | } |
2272 | |
2273 | ShuffleAndRepeatDataset::ShuffleAndRepeatDataset(const ::tensorflow::Scope& |
2274 | scope, ::tensorflow::Input |
2275 | input_dataset, |
2276 | ::tensorflow::Input |
2277 | buffer_size, |
2278 | ::tensorflow::Input seed, |
2279 | ::tensorflow::Input seed2, |
2280 | ::tensorflow::Input count, |
2281 | const DataTypeSlice& |
2282 | output_types, const |
2283 | gtl::ArraySlice<PartialTensorShape>& |
2284 | output_shapes) |
2285 | : ShuffleAndRepeatDataset(scope, input_dataset, buffer_size, seed, seed2, count, output_types, output_shapes, ShuffleAndRepeatDataset::Attrs()) {} |
2286 | |
2287 | ShuffleAndRepeatDatasetV2::ShuffleAndRepeatDatasetV2(const ::tensorflow::Scope& |
2288 | scope, ::tensorflow::Input |
2289 | input_dataset, |
2290 | ::tensorflow::Input |
2291 | buffer_size, |
2292 | ::tensorflow::Input seed, |
2293 | ::tensorflow::Input seed2, |
2294 | ::tensorflow::Input count, |
2295 | ::tensorflow::Input |
2296 | seed_generator, const |
2297 | DataTypeSlice& |
2298 | output_types, const |
2299 | gtl::ArraySlice<PartialTensorShape>& |
2300 | output_shapes, const |
2301 | ShuffleAndRepeatDatasetV2::Attrs& |
2302 | attrs) { |
2303 | if (!scope.ok()) return; |
2304 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2305 | if (!scope.ok()) return; |
2306 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2307 | if (!scope.ok()) return; |
2308 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
2309 | if (!scope.ok()) return; |
2310 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
2311 | if (!scope.ok()) return; |
2312 | auto _count = ::tensorflow::ops::AsNodeOut(scope, count); |
2313 | if (!scope.ok()) return; |
2314 | auto _seed_generator = ::tensorflow::ops::AsNodeOut(scope, seed_generator); |
2315 | if (!scope.ok()) return; |
2316 | ::tensorflow::Node* ret; |
2317 | const auto unique_name = scope.GetUniqueNameForOp("ShuffleAndRepeatDatasetV2" ); |
2318 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShuffleAndRepeatDatasetV2" ) |
2319 | .Input(_input_dataset) |
2320 | .Input(_buffer_size) |
2321 | .Input(_seed) |
2322 | .Input(_seed2) |
2323 | .Input(_count) |
2324 | .Input(_seed_generator) |
2325 | .Attr("reshuffle_each_iteration" , attrs.reshuffle_each_iteration_) |
2326 | .Attr("output_types" , output_types) |
2327 | .Attr("output_shapes" , output_shapes) |
2328 | .Attr("metadata" , attrs.metadata_) |
2329 | ; |
2330 | scope.UpdateBuilder(&builder); |
2331 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2332 | if (!scope.ok()) return; |
2333 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2334 | this->operation = Operation(ret); |
2335 | this->handle = Output(ret, 0); |
2336 | } |
2337 | |
2338 | ShuffleAndRepeatDatasetV2::ShuffleAndRepeatDatasetV2(const ::tensorflow::Scope& |
2339 | scope, ::tensorflow::Input |
2340 | input_dataset, |
2341 | ::tensorflow::Input |
2342 | buffer_size, |
2343 | ::tensorflow::Input seed, |
2344 | ::tensorflow::Input seed2, |
2345 | ::tensorflow::Input count, |
2346 | ::tensorflow::Input |
2347 | seed_generator, const |
2348 | DataTypeSlice& |
2349 | output_types, const |
2350 | gtl::ArraySlice<PartialTensorShape>& |
2351 | output_shapes) |
2352 | : ShuffleAndRepeatDatasetV2(scope, input_dataset, buffer_size, seed, seed2, count, seed_generator, output_types, output_shapes, ShuffleAndRepeatDatasetV2::Attrs()) {} |
2353 | |
2354 | ShuffleDataset::ShuffleDataset(const ::tensorflow::Scope& scope, |
2355 | ::tensorflow::Input input_dataset, |
2356 | ::tensorflow::Input buffer_size, |
2357 | ::tensorflow::Input seed, ::tensorflow::Input |
2358 | seed2, const DataTypeSlice& output_types, const |
2359 | gtl::ArraySlice<PartialTensorShape>& |
2360 | output_shapes, const ShuffleDataset::Attrs& |
2361 | attrs) { |
2362 | if (!scope.ok()) return; |
2363 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2364 | if (!scope.ok()) return; |
2365 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2366 | if (!scope.ok()) return; |
2367 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
2368 | if (!scope.ok()) return; |
2369 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
2370 | if (!scope.ok()) return; |
2371 | ::tensorflow::Node* ret; |
2372 | const auto unique_name = scope.GetUniqueNameForOp("ShuffleDataset" ); |
2373 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShuffleDataset" ) |
2374 | .Input(_input_dataset) |
2375 | .Input(_buffer_size) |
2376 | .Input(_seed) |
2377 | .Input(_seed2) |
2378 | .Attr("reshuffle_each_iteration" , attrs.reshuffle_each_iteration_) |
2379 | .Attr("output_types" , output_types) |
2380 | .Attr("output_shapes" , output_shapes) |
2381 | .Attr("metadata" , attrs.metadata_) |
2382 | ; |
2383 | scope.UpdateBuilder(&builder); |
2384 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2385 | if (!scope.ok()) return; |
2386 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2387 | this->operation = Operation(ret); |
2388 | this->handle = Output(ret, 0); |
2389 | } |
2390 | |
2391 | ShuffleDataset::ShuffleDataset(const ::tensorflow::Scope& scope, |
2392 | ::tensorflow::Input input_dataset, |
2393 | ::tensorflow::Input buffer_size, |
2394 | ::tensorflow::Input seed, ::tensorflow::Input |
2395 | seed2, const DataTypeSlice& output_types, const |
2396 | gtl::ArraySlice<PartialTensorShape>& |
2397 | output_shapes) |
2398 | : ShuffleDataset(scope, input_dataset, buffer_size, seed, seed2, output_types, output_shapes, ShuffleDataset::Attrs()) {} |
2399 | |
2400 | ShuffleDatasetV2::ShuffleDatasetV2(const ::tensorflow::Scope& scope, |
2401 | ::tensorflow::Input input_dataset, |
2402 | ::tensorflow::Input buffer_size, |
2403 | ::tensorflow::Input seed_generator, const |
2404 | DataTypeSlice& output_types, const |
2405 | gtl::ArraySlice<PartialTensorShape>& |
2406 | output_shapes, const |
2407 | ShuffleDatasetV2::Attrs& attrs) { |
2408 | if (!scope.ok()) return; |
2409 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2410 | if (!scope.ok()) return; |
2411 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2412 | if (!scope.ok()) return; |
2413 | auto _seed_generator = ::tensorflow::ops::AsNodeOut(scope, seed_generator); |
2414 | if (!scope.ok()) return; |
2415 | ::tensorflow::Node* ret; |
2416 | const auto unique_name = scope.GetUniqueNameForOp("ShuffleDatasetV2" ); |
2417 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShuffleDatasetV2" ) |
2418 | .Input(_input_dataset) |
2419 | .Input(_buffer_size) |
2420 | .Input(_seed_generator) |
2421 | .Attr("output_types" , output_types) |
2422 | .Attr("output_shapes" , output_shapes) |
2423 | .Attr("metadata" , attrs.metadata_) |
2424 | ; |
2425 | scope.UpdateBuilder(&builder); |
2426 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2427 | if (!scope.ok()) return; |
2428 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2429 | this->operation = Operation(ret); |
2430 | this->handle = Output(ret, 0); |
2431 | } |
2432 | |
2433 | ShuffleDatasetV2::ShuffleDatasetV2(const ::tensorflow::Scope& scope, |
2434 | ::tensorflow::Input input_dataset, |
2435 | ::tensorflow::Input buffer_size, |
2436 | ::tensorflow::Input seed_generator, const |
2437 | DataTypeSlice& output_types, const |
2438 | gtl::ArraySlice<PartialTensorShape>& |
2439 | output_shapes) |
2440 | : ShuffleDatasetV2(scope, input_dataset, buffer_size, seed_generator, output_types, output_shapes, ShuffleDatasetV2::Attrs()) {} |
2441 | |
2442 | ShuffleDatasetV3::ShuffleDatasetV3(const ::tensorflow::Scope& scope, |
2443 | ::tensorflow::Input input_dataset, |
2444 | ::tensorflow::Input buffer_size, |
2445 | ::tensorflow::Input seed, |
2446 | ::tensorflow::Input seed2, |
2447 | ::tensorflow::Input seed_generator, const |
2448 | DataTypeSlice& output_types, const |
2449 | gtl::ArraySlice<PartialTensorShape>& |
2450 | output_shapes, const |
2451 | ShuffleDatasetV3::Attrs& attrs) { |
2452 | if (!scope.ok()) return; |
2453 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2454 | if (!scope.ok()) return; |
2455 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2456 | if (!scope.ok()) return; |
2457 | auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed); |
2458 | if (!scope.ok()) return; |
2459 | auto _seed2 = ::tensorflow::ops::AsNodeOut(scope, seed2); |
2460 | if (!scope.ok()) return; |
2461 | auto _seed_generator = ::tensorflow::ops::AsNodeOut(scope, seed_generator); |
2462 | if (!scope.ok()) return; |
2463 | ::tensorflow::Node* ret; |
2464 | const auto unique_name = scope.GetUniqueNameForOp("ShuffleDatasetV3" ); |
2465 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShuffleDatasetV3" ) |
2466 | .Input(_input_dataset) |
2467 | .Input(_buffer_size) |
2468 | .Input(_seed) |
2469 | .Input(_seed2) |
2470 | .Input(_seed_generator) |
2471 | .Attr("reshuffle_each_iteration" , attrs.reshuffle_each_iteration_) |
2472 | .Attr("output_types" , output_types) |
2473 | .Attr("output_shapes" , output_shapes) |
2474 | .Attr("metadata" , attrs.metadata_) |
2475 | ; |
2476 | scope.UpdateBuilder(&builder); |
2477 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2478 | if (!scope.ok()) return; |
2479 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2480 | this->operation = Operation(ret); |
2481 | this->handle = Output(ret, 0); |
2482 | } |
2483 | |
2484 | ShuffleDatasetV3::ShuffleDatasetV3(const ::tensorflow::Scope& scope, |
2485 | ::tensorflow::Input input_dataset, |
2486 | ::tensorflow::Input buffer_size, |
2487 | ::tensorflow::Input seed, |
2488 | ::tensorflow::Input seed2, |
2489 | ::tensorflow::Input seed_generator, const |
2490 | DataTypeSlice& output_types, const |
2491 | gtl::ArraySlice<PartialTensorShape>& |
2492 | output_shapes) |
2493 | : ShuffleDatasetV3(scope, input_dataset, buffer_size, seed, seed2, seed_generator, output_types, output_shapes, ShuffleDatasetV3::Attrs()) {} |
2494 | |
2495 | SkipDataset::SkipDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2496 | input_dataset, ::tensorflow::Input count, const |
2497 | DataTypeSlice& output_types, const |
2498 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
2499 | const SkipDataset::Attrs& attrs) { |
2500 | if (!scope.ok()) return; |
2501 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2502 | if (!scope.ok()) return; |
2503 | auto _count = ::tensorflow::ops::AsNodeOut(scope, count); |
2504 | if (!scope.ok()) return; |
2505 | ::tensorflow::Node* ret; |
2506 | const auto unique_name = scope.GetUniqueNameForOp("SkipDataset" ); |
2507 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SkipDataset" ) |
2508 | .Input(_input_dataset) |
2509 | .Input(_count) |
2510 | .Attr("output_types" , output_types) |
2511 | .Attr("output_shapes" , output_shapes) |
2512 | .Attr("metadata" , attrs.metadata_) |
2513 | ; |
2514 | scope.UpdateBuilder(&builder); |
2515 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2516 | if (!scope.ok()) return; |
2517 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2518 | this->operation = Operation(ret); |
2519 | this->handle = Output(ret, 0); |
2520 | } |
2521 | |
2522 | SkipDataset::SkipDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2523 | input_dataset, ::tensorflow::Input count, const |
2524 | DataTypeSlice& output_types, const |
2525 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
2526 | : SkipDataset(scope, input_dataset, count, output_types, output_shapes, SkipDataset::Attrs()) {} |
2527 | |
2528 | SparseTensorSliceDataset::SparseTensorSliceDataset(const ::tensorflow::Scope& |
2529 | scope, ::tensorflow::Input |
2530 | indices, ::tensorflow::Input |
2531 | values, ::tensorflow::Input |
2532 | dense_shape) { |
2533 | if (!scope.ok()) return; |
2534 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2535 | if (!scope.ok()) return; |
2536 | auto _values = ::tensorflow::ops::AsNodeOut(scope, values); |
2537 | if (!scope.ok()) return; |
2538 | auto _dense_shape = ::tensorflow::ops::AsNodeOut(scope, dense_shape); |
2539 | if (!scope.ok()) return; |
2540 | ::tensorflow::Node* ret; |
2541 | const auto unique_name = scope.GetUniqueNameForOp("SparseTensorSliceDataset" ); |
2542 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseTensorSliceDataset" ) |
2543 | .Input(_indices) |
2544 | .Input(_values) |
2545 | .Input(_dense_shape) |
2546 | ; |
2547 | scope.UpdateBuilder(&builder); |
2548 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2549 | if (!scope.ok()) return; |
2550 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2551 | this->operation = Operation(ret); |
2552 | this->handle = Output(ret, 0); |
2553 | } |
2554 | |
2555 | TFRecordDataset::TFRecordDataset(const ::tensorflow::Scope& scope, |
2556 | ::tensorflow::Input filenames, |
2557 | ::tensorflow::Input compression_type, |
2558 | ::tensorflow::Input buffer_size, const |
2559 | TFRecordDataset::Attrs& attrs) { |
2560 | if (!scope.ok()) return; |
2561 | auto _filenames = ::tensorflow::ops::AsNodeOut(scope, filenames); |
2562 | if (!scope.ok()) return; |
2563 | auto _compression_type = ::tensorflow::ops::AsNodeOut(scope, compression_type); |
2564 | if (!scope.ok()) return; |
2565 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2566 | if (!scope.ok()) return; |
2567 | ::tensorflow::Node* ret; |
2568 | const auto unique_name = scope.GetUniqueNameForOp("TFRecordDataset" ); |
2569 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TFRecordDataset" ) |
2570 | .Input(_filenames) |
2571 | .Input(_compression_type) |
2572 | .Input(_buffer_size) |
2573 | .Attr("metadata" , attrs.metadata_) |
2574 | ; |
2575 | scope.UpdateBuilder(&builder); |
2576 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2577 | if (!scope.ok()) return; |
2578 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2579 | this->operation = Operation(ret); |
2580 | this->handle = Output(ret, 0); |
2581 | } |
2582 | |
2583 | TFRecordDataset::TFRecordDataset(const ::tensorflow::Scope& scope, |
2584 | ::tensorflow::Input filenames, |
2585 | ::tensorflow::Input compression_type, |
2586 | ::tensorflow::Input buffer_size) |
2587 | : TFRecordDataset(scope, filenames, compression_type, buffer_size, TFRecordDataset::Attrs()) {} |
2588 | |
2589 | TakeDataset::TakeDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2590 | input_dataset, ::tensorflow::Input count, const |
2591 | DataTypeSlice& output_types, const |
2592 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
2593 | const TakeDataset::Attrs& attrs) { |
2594 | if (!scope.ok()) return; |
2595 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2596 | if (!scope.ok()) return; |
2597 | auto _count = ::tensorflow::ops::AsNodeOut(scope, count); |
2598 | if (!scope.ok()) return; |
2599 | ::tensorflow::Node* ret; |
2600 | const auto unique_name = scope.GetUniqueNameForOp("TakeDataset" ); |
2601 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TakeDataset" ) |
2602 | .Input(_input_dataset) |
2603 | .Input(_count) |
2604 | .Attr("output_types" , output_types) |
2605 | .Attr("output_shapes" , output_shapes) |
2606 | .Attr("metadata" , attrs.metadata_) |
2607 | ; |
2608 | scope.UpdateBuilder(&builder); |
2609 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2610 | if (!scope.ok()) return; |
2611 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2612 | this->operation = Operation(ret); |
2613 | this->handle = Output(ret, 0); |
2614 | } |
2615 | |
2616 | TakeDataset::TakeDataset(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2617 | input_dataset, ::tensorflow::Input count, const |
2618 | DataTypeSlice& output_types, const |
2619 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
2620 | : TakeDataset(scope, input_dataset, count, output_types, output_shapes, TakeDataset::Attrs()) {} |
2621 | |
2622 | TensorDataset::TensorDataset(const ::tensorflow::Scope& scope, |
2623 | ::tensorflow::InputList components, const |
2624 | gtl::ArraySlice<PartialTensorShape>& |
2625 | output_shapes, const TensorDataset::Attrs& attrs) { |
2626 | if (!scope.ok()) return; |
2627 | auto _components = ::tensorflow::ops::AsNodeOutList(scope, components); |
2628 | if (!scope.ok()) return; |
2629 | ::tensorflow::Node* ret; |
2630 | const auto unique_name = scope.GetUniqueNameForOp("TensorDataset" ); |
2631 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorDataset" ) |
2632 | .Input(_components) |
2633 | .Attr("output_shapes" , output_shapes) |
2634 | .Attr("metadata" , attrs.metadata_) |
2635 | ; |
2636 | scope.UpdateBuilder(&builder); |
2637 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2638 | if (!scope.ok()) return; |
2639 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2640 | this->operation = Operation(ret); |
2641 | this->handle = Output(ret, 0); |
2642 | } |
2643 | |
2644 | TensorDataset::TensorDataset(const ::tensorflow::Scope& scope, |
2645 | ::tensorflow::InputList components, const |
2646 | gtl::ArraySlice<PartialTensorShape>& |
2647 | output_shapes) |
2648 | : TensorDataset(scope, components, output_shapes, TensorDataset::Attrs()) {} |
2649 | |
2650 | TensorSliceDataset::TensorSliceDataset(const ::tensorflow::Scope& scope, |
2651 | ::tensorflow::InputList components, |
2652 | const |
2653 | gtl::ArraySlice<PartialTensorShape>& |
2654 | output_shapes, const |
2655 | TensorSliceDataset::Attrs& attrs) { |
2656 | if (!scope.ok()) return; |
2657 | auto _components = ::tensorflow::ops::AsNodeOutList(scope, components); |
2658 | if (!scope.ok()) return; |
2659 | ::tensorflow::Node* ret; |
2660 | const auto unique_name = scope.GetUniqueNameForOp("TensorSliceDataset" ); |
2661 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorSliceDataset" ) |
2662 | .Input(_components) |
2663 | .Attr("output_shapes" , output_shapes) |
2664 | .Attr("is_files" , attrs.is_files_) |
2665 | .Attr("metadata" , attrs.metadata_) |
2666 | .Attr("replicate_on_split" , attrs.replicate_on_split_) |
2667 | ; |
2668 | scope.UpdateBuilder(&builder); |
2669 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2670 | if (!scope.ok()) return; |
2671 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2672 | this->operation = Operation(ret); |
2673 | this->handle = Output(ret, 0); |
2674 | } |
2675 | |
2676 | TensorSliceDataset::TensorSliceDataset(const ::tensorflow::Scope& scope, |
2677 | ::tensorflow::InputList components, |
2678 | const |
2679 | gtl::ArraySlice<PartialTensorShape>& |
2680 | output_shapes) |
2681 | : TensorSliceDataset(scope, components, output_shapes, TensorSliceDataset::Attrs()) {} |
2682 | |
2683 | TextLineDataset::TextLineDataset(const ::tensorflow::Scope& scope, |
2684 | ::tensorflow::Input filenames, |
2685 | ::tensorflow::Input compression_type, |
2686 | ::tensorflow::Input buffer_size, const |
2687 | TextLineDataset::Attrs& attrs) { |
2688 | if (!scope.ok()) return; |
2689 | auto _filenames = ::tensorflow::ops::AsNodeOut(scope, filenames); |
2690 | if (!scope.ok()) return; |
2691 | auto _compression_type = ::tensorflow::ops::AsNodeOut(scope, compression_type); |
2692 | if (!scope.ok()) return; |
2693 | auto _buffer_size = ::tensorflow::ops::AsNodeOut(scope, buffer_size); |
2694 | if (!scope.ok()) return; |
2695 | ::tensorflow::Node* ret; |
2696 | const auto unique_name = scope.GetUniqueNameForOp("TextLineDataset" ); |
2697 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TextLineDataset" ) |
2698 | .Input(_filenames) |
2699 | .Input(_compression_type) |
2700 | .Input(_buffer_size) |
2701 | .Attr("metadata" , attrs.metadata_) |
2702 | ; |
2703 | scope.UpdateBuilder(&builder); |
2704 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2705 | if (!scope.ok()) return; |
2706 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2707 | this->operation = Operation(ret); |
2708 | this->handle = Output(ret, 0); |
2709 | } |
2710 | |
2711 | TextLineDataset::TextLineDataset(const ::tensorflow::Scope& scope, |
2712 | ::tensorflow::Input filenames, |
2713 | ::tensorflow::Input compression_type, |
2714 | ::tensorflow::Input buffer_size) |
2715 | : TextLineDataset(scope, filenames, compression_type, buffer_size, TextLineDataset::Attrs()) {} |
2716 | |
2717 | UnwrapDatasetVariant::UnwrapDatasetVariant(const ::tensorflow::Scope& scope, |
2718 | ::tensorflow::Input input_handle) { |
2719 | if (!scope.ok()) return; |
2720 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
2721 | if (!scope.ok()) return; |
2722 | ::tensorflow::Node* ret; |
2723 | const auto unique_name = scope.GetUniqueNameForOp("UnwrapDatasetVariant" ); |
2724 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnwrapDatasetVariant" ) |
2725 | .Input(_input_handle) |
2726 | ; |
2727 | scope.UpdateBuilder(&builder); |
2728 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2729 | if (!scope.ok()) return; |
2730 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2731 | this->operation = Operation(ret); |
2732 | this->output_handle = Output(ret, 0); |
2733 | } |
2734 | |
2735 | WindowDataset::WindowDataset(const ::tensorflow::Scope& scope, |
2736 | ::tensorflow::Input input_dataset, |
2737 | ::tensorflow::Input size, ::tensorflow::Input |
2738 | shift, ::tensorflow::Input stride, |
2739 | ::tensorflow::Input drop_remainder, const |
2740 | DataTypeSlice& output_types, const |
2741 | gtl::ArraySlice<PartialTensorShape>& |
2742 | output_shapes, const WindowDataset::Attrs& attrs) { |
2743 | if (!scope.ok()) return; |
2744 | auto _input_dataset = ::tensorflow::ops::AsNodeOut(scope, input_dataset); |
2745 | if (!scope.ok()) return; |
2746 | auto _size = ::tensorflow::ops::AsNodeOut(scope, size); |
2747 | if (!scope.ok()) return; |
2748 | auto _shift = ::tensorflow::ops::AsNodeOut(scope, shift); |
2749 | if (!scope.ok()) return; |
2750 | auto _stride = ::tensorflow::ops::AsNodeOut(scope, stride); |
2751 | if (!scope.ok()) return; |
2752 | auto _drop_remainder = ::tensorflow::ops::AsNodeOut(scope, drop_remainder); |
2753 | if (!scope.ok()) return; |
2754 | ::tensorflow::Node* ret; |
2755 | const auto unique_name = scope.GetUniqueNameForOp("WindowDataset" ); |
2756 | auto builder = ::tensorflow::NodeBuilder(unique_name, "WindowDataset" ) |
2757 | .Input(_input_dataset) |
2758 | .Input(_size) |
2759 | .Input(_shift) |
2760 | .Input(_stride) |
2761 | .Input(_drop_remainder) |
2762 | .Attr("output_types" , output_types) |
2763 | .Attr("output_shapes" , output_shapes) |
2764 | .Attr("metadata" , attrs.metadata_) |
2765 | ; |
2766 | scope.UpdateBuilder(&builder); |
2767 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2768 | if (!scope.ok()) return; |
2769 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2770 | this->operation = Operation(ret); |
2771 | this->handle = Output(ret, 0); |
2772 | } |
2773 | |
2774 | WindowDataset::WindowDataset(const ::tensorflow::Scope& scope, |
2775 | ::tensorflow::Input input_dataset, |
2776 | ::tensorflow::Input size, ::tensorflow::Input |
2777 | shift, ::tensorflow::Input stride, |
2778 | ::tensorflow::Input drop_remainder, const |
2779 | DataTypeSlice& output_types, const |
2780 | gtl::ArraySlice<PartialTensorShape>& |
2781 | output_shapes) |
2782 | : WindowDataset(scope, input_dataset, size, shift, stride, drop_remainder, output_types, output_shapes, WindowDataset::Attrs()) {} |
2783 | |
2784 | WindowOp::WindowOp(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
2785 | inputs, const DataTypeSlice& output_types, const |
2786 | gtl::ArraySlice<PartialTensorShape>& output_shapes) { |
2787 | if (!scope.ok()) return; |
2788 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
2789 | if (!scope.ok()) return; |
2790 | ::tensorflow::Node* ret; |
2791 | const auto unique_name = scope.GetUniqueNameForOp("WindowOp" ); |
2792 | auto builder = ::tensorflow::NodeBuilder(unique_name, "WindowOp" ) |
2793 | .Input(_inputs) |
2794 | .Attr("output_types" , output_types) |
2795 | .Attr("output_shapes" , output_shapes) |
2796 | ; |
2797 | scope.UpdateBuilder(&builder); |
2798 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2799 | if (!scope.ok()) return; |
2800 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2801 | this->operation = Operation(ret); |
2802 | this->handle = Output(ret, 0); |
2803 | } |
2804 | |
2805 | WrapDatasetVariant::WrapDatasetVariant(const ::tensorflow::Scope& scope, |
2806 | ::tensorflow::Input input_handle) { |
2807 | if (!scope.ok()) return; |
2808 | auto _input_handle = ::tensorflow::ops::AsNodeOut(scope, input_handle); |
2809 | if (!scope.ok()) return; |
2810 | ::tensorflow::Node* ret; |
2811 | const auto unique_name = scope.GetUniqueNameForOp("WrapDatasetVariant" ); |
2812 | auto builder = ::tensorflow::NodeBuilder(unique_name, "WrapDatasetVariant" ) |
2813 | .Input(_input_handle) |
2814 | ; |
2815 | scope.UpdateBuilder(&builder); |
2816 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2817 | if (!scope.ok()) return; |
2818 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2819 | this->operation = Operation(ret); |
2820 | this->output_handle = Output(ret, 0); |
2821 | } |
2822 | |
2823 | ZipDataset::ZipDataset(const ::tensorflow::Scope& scope, |
2824 | ::tensorflow::InputList input_datasets, const |
2825 | DataTypeSlice& output_types, const |
2826 | gtl::ArraySlice<PartialTensorShape>& output_shapes, |
2827 | const ZipDataset::Attrs& attrs) { |
2828 | if (!scope.ok()) return; |
2829 | auto _input_datasets = ::tensorflow::ops::AsNodeOutList(scope, input_datasets); |
2830 | if (!scope.ok()) return; |
2831 | ::tensorflow::Node* ret; |
2832 | const auto unique_name = scope.GetUniqueNameForOp("ZipDataset" ); |
2833 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ZipDataset" ) |
2834 | .Input(_input_datasets) |
2835 | .Attr("output_types" , output_types) |
2836 | .Attr("output_shapes" , output_shapes) |
2837 | .Attr("metadata" , attrs.metadata_) |
2838 | ; |
2839 | scope.UpdateBuilder(&builder); |
2840 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2841 | if (!scope.ok()) return; |
2842 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2843 | this->operation = Operation(ret); |
2844 | this->handle = Output(ret, 0); |
2845 | } |
2846 | |
2847 | ZipDataset::ZipDataset(const ::tensorflow::Scope& scope, |
2848 | ::tensorflow::InputList input_datasets, const |
2849 | DataTypeSlice& output_types, const |
2850 | gtl::ArraySlice<PartialTensorShape>& output_shapes) |
2851 | : ZipDataset(scope, input_datasets, output_types, output_shapes, ZipDataset::Attrs()) {} |
2852 | |
2853 | } // namespace internal |
2854 | } // namespace ops |
2855 | } // namespace tensorflow |
2856 | |