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.h"
6
7namespace tensorflow {
8namespace ops {
9
10AnonymousIterator::AnonymousIterator(const ::tensorflow::Scope& scope, const
11 DataTypeSlice& output_types, const
12 gtl::ArraySlice<PartialTensorShape>&
13 output_shapes) {
14 if (!scope.ok()) return;
15 ::tensorflow::Node* ret;
16 const auto unique_name = scope.GetUniqueNameForOp("AnonymousIterator");
17 auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousIterator")
18 .Attr("output_types", output_types)
19 .Attr("output_shapes", output_shapes)
20 ;
21 scope.UpdateBuilder(&builder);
22 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
23 if (!scope.ok()) return;
24 scope.UpdateStatus(scope.DoShapeInference(ret));
25 this->operation = Operation(ret);
26 this->handle = Output(ret, 0);
27}
28
29DeserializeIterator::DeserializeIterator(const ::tensorflow::Scope& scope,
30 ::tensorflow::Input resource_handle,
31 ::tensorflow::Input serialized) {
32 if (!scope.ok()) return;
33 auto _resource_handle = ::tensorflow::ops::AsNodeOut(scope, resource_handle);
34 if (!scope.ok()) return;
35 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
36 if (!scope.ok()) return;
37 ::tensorflow::Node* ret;
38 const auto unique_name = scope.GetUniqueNameForOp("DeserializeIterator");
39 auto builder = ::tensorflow::NodeBuilder(unique_name, "DeserializeIterator")
40 .Input(_resource_handle)
41 .Input(_serialized)
42 ;
43 scope.UpdateBuilder(&builder);
44 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
45 if (!scope.ok()) return;
46 scope.UpdateStatus(scope.DoShapeInference(ret));
47 this->operation = Operation(ret);
48 return;
49}
50
51Iterator::Iterator(const ::tensorflow::Scope& scope, StringPiece shared_name,
52 StringPiece container, const DataTypeSlice& output_types,
53 const gtl::ArraySlice<PartialTensorShape>& output_shapes) {
54 if (!scope.ok()) return;
55 ::tensorflow::Node* ret;
56 const auto unique_name = scope.GetUniqueNameForOp("Iterator");
57 auto builder = ::tensorflow::NodeBuilder(unique_name, "Iterator")
58 .Attr("shared_name", shared_name)
59 .Attr("container", container)
60 .Attr("output_types", output_types)
61 .Attr("output_shapes", output_shapes)
62 ;
63 scope.UpdateBuilder(&builder);
64 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
65 if (!scope.ok()) return;
66 scope.UpdateStatus(scope.DoShapeInference(ret));
67 this->operation = Operation(ret);
68 this->handle = Output(ret, 0);
69}
70
71IteratorFromStringHandle::IteratorFromStringHandle(const ::tensorflow::Scope&
72 scope, ::tensorflow::Input
73 string_handle, const
74 IteratorFromStringHandle::Attrs&
75 attrs) {
76 if (!scope.ok()) return;
77 auto _string_handle = ::tensorflow::ops::AsNodeOut(scope, string_handle);
78 if (!scope.ok()) return;
79 ::tensorflow::Node* ret;
80 const auto unique_name = scope.GetUniqueNameForOp("IteratorFromStringHandle");
81 auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorFromStringHandle")
82 .Input(_string_handle)
83 .Attr("output_types", attrs.output_types_)
84 .Attr("output_shapes", attrs.output_shapes_)
85 ;
86 scope.UpdateBuilder(&builder);
87 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
88 if (!scope.ok()) return;
89 scope.UpdateStatus(scope.DoShapeInference(ret));
90 this->operation = Operation(ret);
91 this->resource_handle = Output(ret, 0);
92}
93
94IteratorFromStringHandle::IteratorFromStringHandle(const ::tensorflow::Scope&
95 scope, ::tensorflow::Input
96 string_handle)
97 : IteratorFromStringHandle(scope, string_handle, IteratorFromStringHandle::Attrs()) {}
98
99IteratorGetNext::IteratorGetNext(const ::tensorflow::Scope& scope,
100 ::tensorflow::Input iterator, const
101 DataTypeSlice& output_types, const
102 gtl::ArraySlice<PartialTensorShape>&
103 output_shapes) {
104 if (!scope.ok()) return;
105 auto _iterator = ::tensorflow::ops::AsNodeOut(scope, iterator);
106 if (!scope.ok()) return;
107 ::tensorflow::Node* ret;
108 const auto unique_name = scope.GetUniqueNameForOp("IteratorGetNext");
109 auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorGetNext")
110 .Input(_iterator)
111 .Attr("output_types", output_types)
112 .Attr("output_shapes", output_shapes)
113 ;
114 scope.UpdateBuilder(&builder);
115 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
116 if (!scope.ok()) return;
117 scope.UpdateStatus(scope.DoShapeInference(ret));
118 this->operation = Operation(ret);
119 for (int32 i = 0; i < ret->num_outputs(); ++i)
120 this->components.push_back(Output(ret, i));
121}
122
123IteratorGetNextAsOptional::IteratorGetNextAsOptional(const ::tensorflow::Scope&
124 scope, ::tensorflow::Input
125 iterator, const
126 DataTypeSlice&
127 output_types, const
128 gtl::ArraySlice<PartialTensorShape>&
129 output_shapes) {
130 if (!scope.ok()) return;
131 auto _iterator = ::tensorflow::ops::AsNodeOut(scope, iterator);
132 if (!scope.ok()) return;
133 ::tensorflow::Node* ret;
134 const auto unique_name = scope.GetUniqueNameForOp("IteratorGetNextAsOptional");
135 auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorGetNextAsOptional")
136 .Input(_iterator)
137 .Attr("output_types", output_types)
138 .Attr("output_shapes", output_shapes)
139 ;
140 scope.UpdateBuilder(&builder);
141 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
142 if (!scope.ok()) return;
143 scope.UpdateStatus(scope.DoShapeInference(ret));
144 this->operation = Operation(ret);
145 this->optional = Output(ret, 0);
146}
147
148IteratorGetNextSync::IteratorGetNextSync(const ::tensorflow::Scope& scope,
149 ::tensorflow::Input iterator, const
150 DataTypeSlice& output_types, const
151 gtl::ArraySlice<PartialTensorShape>&
152 output_shapes) {
153 if (!scope.ok()) return;
154 auto _iterator = ::tensorflow::ops::AsNodeOut(scope, iterator);
155 if (!scope.ok()) return;
156 ::tensorflow::Node* ret;
157 const auto unique_name = scope.GetUniqueNameForOp("IteratorGetNextSync");
158 auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorGetNextSync")
159 .Input(_iterator)
160 .Attr("output_types", output_types)
161 .Attr("output_shapes", output_shapes)
162 ;
163 scope.UpdateBuilder(&builder);
164 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
165 if (!scope.ok()) return;
166 scope.UpdateStatus(scope.DoShapeInference(ret));
167 this->operation = Operation(ret);
168 for (int32 i = 0; i < ret->num_outputs(); ++i)
169 this->components.push_back(Output(ret, i));
170}
171
172IteratorToStringHandle::IteratorToStringHandle(const ::tensorflow::Scope&
173 scope, ::tensorflow::Input
174 resource_handle) {
175 if (!scope.ok()) return;
176 auto _resource_handle = ::tensorflow::ops::AsNodeOut(scope, resource_handle);
177 if (!scope.ok()) return;
178 ::tensorflow::Node* ret;
179 const auto unique_name = scope.GetUniqueNameForOp("IteratorToStringHandle");
180 auto builder = ::tensorflow::NodeBuilder(unique_name, "IteratorToStringHandle")
181 .Input(_resource_handle)
182 ;
183 scope.UpdateBuilder(&builder);
184 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
185 if (!scope.ok()) return;
186 scope.UpdateStatus(scope.DoShapeInference(ret));
187 this->operation = Operation(ret);
188 this->string_handle = Output(ret, 0);
189}
190
191MakeIterator::MakeIterator(const ::tensorflow::Scope& scope,
192 ::tensorflow::Input dataset, ::tensorflow::Input
193 iterator) {
194 if (!scope.ok()) return;
195 auto _dataset = ::tensorflow::ops::AsNodeOut(scope, dataset);
196 if (!scope.ok()) return;
197 auto _iterator = ::tensorflow::ops::AsNodeOut(scope, iterator);
198 if (!scope.ok()) return;
199 ::tensorflow::Node* ret;
200 const auto unique_name = scope.GetUniqueNameForOp("MakeIterator");
201 auto builder = ::tensorflow::NodeBuilder(unique_name, "MakeIterator")
202 .Input(_dataset)
203 .Input(_iterator)
204 ;
205 scope.UpdateBuilder(&builder);
206 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
207 if (!scope.ok()) return;
208 scope.UpdateStatus(scope.DoShapeInference(ret));
209 this->operation = Operation(ret);
210 return;
211}
212
213OneShotIterator::OneShotIterator(const ::tensorflow::Scope& scope, const
214 NameAttrList& dataset_factory, const
215 DataTypeSlice& output_types, const
216 gtl::ArraySlice<PartialTensorShape>&
217 output_shapes, const OneShotIterator::Attrs&
218 attrs) {
219 if (!scope.ok()) return;
220 ::tensorflow::Node* ret;
221 const auto unique_name = scope.GetUniqueNameForOp("OneShotIterator");
222 auto builder = ::tensorflow::NodeBuilder(unique_name, "OneShotIterator")
223 .Attr("dataset_factory", dataset_factory)
224 .Attr("output_types", output_types)
225 .Attr("output_shapes", output_shapes)
226 .Attr("container", attrs.container_)
227 .Attr("shared_name", attrs.shared_name_)
228 ;
229 scope.UpdateBuilder(&builder);
230 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
231 if (!scope.ok()) return;
232 scope.UpdateStatus(scope.DoShapeInference(ret));
233 this->operation = Operation(ret);
234 this->handle = Output(ret, 0);
235}
236
237OneShotIterator::OneShotIterator(const ::tensorflow::Scope& scope, const
238 NameAttrList& dataset_factory, const
239 DataTypeSlice& output_types, const
240 gtl::ArraySlice<PartialTensorShape>&
241 output_shapes)
242 : OneShotIterator(scope, dataset_factory, output_types, output_shapes, OneShotIterator::Attrs()) {}
243
244OptionalFromValue::OptionalFromValue(const ::tensorflow::Scope& scope,
245 ::tensorflow::InputList components) {
246 if (!scope.ok()) return;
247 auto _components = ::tensorflow::ops::AsNodeOutList(scope, components);
248 if (!scope.ok()) return;
249 ::tensorflow::Node* ret;
250 const auto unique_name = scope.GetUniqueNameForOp("OptionalFromValue");
251 auto builder = ::tensorflow::NodeBuilder(unique_name, "OptionalFromValue")
252 .Input(_components)
253 ;
254 scope.UpdateBuilder(&builder);
255 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
256 if (!scope.ok()) return;
257 scope.UpdateStatus(scope.DoShapeInference(ret));
258 this->operation = Operation(ret);
259 this->optional = Output(ret, 0);
260}
261
262OptionalGetValue::OptionalGetValue(const ::tensorflow::Scope& scope,
263 ::tensorflow::Input optional, const
264 DataTypeSlice& output_types, const
265 gtl::ArraySlice<PartialTensorShape>&
266 output_shapes) {
267 if (!scope.ok()) return;
268 auto _optional = ::tensorflow::ops::AsNodeOut(scope, optional);
269 if (!scope.ok()) return;
270 ::tensorflow::Node* ret;
271 const auto unique_name = scope.GetUniqueNameForOp("OptionalGetValue");
272 auto builder = ::tensorflow::NodeBuilder(unique_name, "OptionalGetValue")
273 .Input(_optional)
274 .Attr("output_types", output_types)
275 .Attr("output_shapes", output_shapes)
276 ;
277 scope.UpdateBuilder(&builder);
278 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
279 if (!scope.ok()) return;
280 scope.UpdateStatus(scope.DoShapeInference(ret));
281 this->operation = Operation(ret);
282 for (int32 i = 0; i < ret->num_outputs(); ++i)
283 this->components.push_back(Output(ret, i));
284}
285
286OptionalHasValue::OptionalHasValue(const ::tensorflow::Scope& scope,
287 ::tensorflow::Input optional) {
288 if (!scope.ok()) return;
289 auto _optional = ::tensorflow::ops::AsNodeOut(scope, optional);
290 if (!scope.ok()) return;
291 ::tensorflow::Node* ret;
292 const auto unique_name = scope.GetUniqueNameForOp("OptionalHasValue");
293 auto builder = ::tensorflow::NodeBuilder(unique_name, "OptionalHasValue")
294 .Input(_optional)
295 ;
296 scope.UpdateBuilder(&builder);
297 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
298 if (!scope.ok()) return;
299 scope.UpdateStatus(scope.DoShapeInference(ret));
300 this->operation = Operation(ret);
301 this->has_value = Output(ret, 0);
302}
303
304OptionalNone::OptionalNone(const ::tensorflow::Scope& scope) {
305 if (!scope.ok()) return;
306 ::tensorflow::Node* ret;
307 const auto unique_name = scope.GetUniqueNameForOp("OptionalNone");
308 auto builder = ::tensorflow::NodeBuilder(unique_name, "OptionalNone")
309 ;
310 scope.UpdateBuilder(&builder);
311 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
312 if (!scope.ok()) return;
313 scope.UpdateStatus(scope.DoShapeInference(ret));
314 this->operation = Operation(ret);
315 this->optional = Output(ret, 0);
316}
317
318SerializeIterator::SerializeIterator(const ::tensorflow::Scope& scope,
319 ::tensorflow::Input resource_handle, const
320 SerializeIterator::Attrs& attrs) {
321 if (!scope.ok()) return;
322 auto _resource_handle = ::tensorflow::ops::AsNodeOut(scope, resource_handle);
323 if (!scope.ok()) return;
324 ::tensorflow::Node* ret;
325 const auto unique_name = scope.GetUniqueNameForOp("SerializeIterator");
326 auto builder = ::tensorflow::NodeBuilder(unique_name, "SerializeIterator")
327 .Input(_resource_handle)
328 .Attr("external_state_policy", attrs.external_state_policy_)
329 ;
330 scope.UpdateBuilder(&builder);
331 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
332 if (!scope.ok()) return;
333 scope.UpdateStatus(scope.DoShapeInference(ret));
334 this->operation = Operation(ret);
335 this->serialized = Output(ret, 0);
336}
337
338SerializeIterator::SerializeIterator(const ::tensorflow::Scope& scope,
339 ::tensorflow::Input resource_handle)
340 : SerializeIterator(scope, resource_handle, SerializeIterator::Attrs()) {}
341
342/// @}
343
344} // namespace ops
345} // namespace tensorflow
346