1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/functional_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10Case::Case(const ::tensorflow::Scope& scope, ::tensorflow::Input branch_index,
11 ::tensorflow::InputList input, const DataTypeSlice& Tout, const
12 gtl::ArraySlice<NameAttrList>& branches, const Case::Attrs& attrs) {
13 if (!scope.ok()) return;
14 auto _branch_index = ::tensorflow::ops::AsNodeOut(scope, branch_index);
15 if (!scope.ok()) return;
16 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
17 if (!scope.ok()) return;
18 ::tensorflow::Node* ret;
19 const auto unique_name = scope.GetUniqueNameForOp("Case");
20 auto builder = ::tensorflow::NodeBuilder(unique_name, "Case")
21 .Input(_branch_index)
22 .Input(_input)
23 .Attr("Tout", Tout)
24 .Attr("branches", branches)
25 .Attr("output_shapes", attrs.output_shapes_)
26 ;
27 scope.UpdateBuilder(&builder);
28 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
29 if (!scope.ok()) return;
30 scope.UpdateStatus(scope.DoShapeInference(ret));
31 this->operation = Operation(ret);
32 for (int32 i = 0; i < ret->num_outputs(); ++i)
33 this->output.push_back(Output(ret, i));
34}
35
36Case::Case(const ::tensorflow::Scope& scope, ::tensorflow::Input branch_index,
37 ::tensorflow::InputList input, const DataTypeSlice& Tout, const
38 gtl::ArraySlice<NameAttrList>& branches)
39 : Case(scope, branch_index, input, Tout, branches, Case::Attrs()) {}
40
41DeviceIndex::DeviceIndex(const ::tensorflow::Scope& scope, const
42 gtl::ArraySlice<::tensorflow::tstring>& device_names) {
43 if (!scope.ok()) return;
44 ::tensorflow::Node* ret;
45 const auto unique_name = scope.GetUniqueNameForOp("DeviceIndex");
46 auto builder = ::tensorflow::NodeBuilder(unique_name, "DeviceIndex")
47 .Attr("device_names", device_names)
48 ;
49 scope.UpdateBuilder(&builder);
50 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
51 if (!scope.ok()) return;
52 scope.UpdateStatus(scope.DoShapeInference(ret));
53 this->operation = Operation(ret);
54 this->index = Output(ret, 0);
55}
56
57FakeParam::FakeParam(const ::tensorflow::Scope& scope, DataType dtype,
58 PartialTensorShape shape) {
59 if (!scope.ok()) return;
60 ::tensorflow::Node* ret;
61 const auto unique_name = scope.GetUniqueNameForOp("FakeParam");
62 auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeParam")
63 .Attr("dtype", dtype)
64 .Attr("shape", shape)
65 ;
66 scope.UpdateBuilder(&builder);
67 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
68 if (!scope.ok()) return;
69 scope.UpdateStatus(scope.DoShapeInference(ret));
70 this->operation = Operation(ret);
71 this->output = Output(ret, 0);
72}
73
74For::For(const ::tensorflow::Scope& scope, ::tensorflow::Input start,
75 ::tensorflow::Input limit, ::tensorflow::Input delta,
76 ::tensorflow::InputList input, const NameAttrList& body) {
77 if (!scope.ok()) return;
78 auto _start = ::tensorflow::ops::AsNodeOut(scope, start);
79 if (!scope.ok()) return;
80 auto _limit = ::tensorflow::ops::AsNodeOut(scope, limit);
81 if (!scope.ok()) return;
82 auto _delta = ::tensorflow::ops::AsNodeOut(scope, delta);
83 if (!scope.ok()) return;
84 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
85 if (!scope.ok()) return;
86 ::tensorflow::Node* ret;
87 const auto unique_name = scope.GetUniqueNameForOp("For");
88 auto builder = ::tensorflow::NodeBuilder(unique_name, "For")
89 .Input(_start)
90 .Input(_limit)
91 .Input(_delta)
92 .Input(_input)
93 .Attr("body", body)
94 ;
95 scope.UpdateBuilder(&builder);
96 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
97 if (!scope.ok()) return;
98 scope.UpdateStatus(scope.DoShapeInference(ret));
99 this->operation = Operation(ret);
100 for (int32 i = 0; i < ret->num_outputs(); ++i)
101 this->output.push_back(Output(ret, i));
102}
103
104If::If(const ::tensorflow::Scope& scope, ::tensorflow::Input cond,
105 ::tensorflow::InputList input, const DataTypeSlice& Tout, const
106 NameAttrList& then_branch, const NameAttrList& else_branch, const
107 If::Attrs& attrs) {
108 if (!scope.ok()) return;
109 auto _cond = ::tensorflow::ops::AsNodeOut(scope, cond);
110 if (!scope.ok()) return;
111 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
112 if (!scope.ok()) return;
113 ::tensorflow::Node* ret;
114 const auto unique_name = scope.GetUniqueNameForOp("If");
115 auto builder = ::tensorflow::NodeBuilder(unique_name, "If")
116 .Input(_cond)
117 .Input(_input)
118 .Attr("Tout", Tout)
119 .Attr("then_branch", then_branch)
120 .Attr("else_branch", else_branch)
121 .Attr("output_shapes", attrs.output_shapes_)
122 ;
123 scope.UpdateBuilder(&builder);
124 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
125 if (!scope.ok()) return;
126 scope.UpdateStatus(scope.DoShapeInference(ret));
127 this->operation = Operation(ret);
128 for (int32 i = 0; i < ret->num_outputs(); ++i)
129 this->output.push_back(Output(ret, i));
130}
131
132If::If(const ::tensorflow::Scope& scope, ::tensorflow::Input cond,
133 ::tensorflow::InputList input, const DataTypeSlice& Tout, const
134 NameAttrList& then_branch, const NameAttrList& else_branch)
135 : If(scope, cond, input, Tout, then_branch, else_branch, If::Attrs()) {}
136
137PartitionedCall::PartitionedCall(const ::tensorflow::Scope& scope,
138 ::tensorflow::InputList args, const
139 DataTypeSlice& Tout, const NameAttrList& f,
140 const PartitionedCall::Attrs& attrs) {
141 if (!scope.ok()) return;
142 auto _args = ::tensorflow::ops::AsNodeOutList(scope, args);
143 if (!scope.ok()) return;
144 ::tensorflow::Node* ret;
145 const auto unique_name = scope.GetUniqueNameForOp("PartitionedCall");
146 auto builder = ::tensorflow::NodeBuilder(unique_name, "PartitionedCall")
147 .Input(_args)
148 .Attr("Tout", Tout)
149 .Attr("f", f)
150 .Attr("config", attrs.config_)
151 .Attr("config_proto", attrs.config_proto_)
152 .Attr("executor_type", attrs.executor_type_)
153 ;
154 scope.UpdateBuilder(&builder);
155 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
156 if (!scope.ok()) return;
157 scope.UpdateStatus(scope.DoShapeInference(ret));
158 this->operation = Operation(ret);
159 for (int32 i = 0; i < ret->num_outputs(); ++i)
160 this->output.push_back(Output(ret, i));
161}
162
163PartitionedCall::PartitionedCall(const ::tensorflow::Scope& scope,
164 ::tensorflow::InputList args, const
165 DataTypeSlice& Tout, const NameAttrList& f)
166 : PartitionedCall(scope, args, Tout, f, PartitionedCall::Attrs()) {}
167
168RemoteCall::RemoteCall(const ::tensorflow::Scope& scope, ::tensorflow::Input
169 target, ::tensorflow::InputList args, const
170 DataTypeSlice& Tout, const NameAttrList& f) {
171 if (!scope.ok()) return;
172 auto _target = ::tensorflow::ops::AsNodeOut(scope, target);
173 if (!scope.ok()) return;
174 auto _args = ::tensorflow::ops::AsNodeOutList(scope, args);
175 if (!scope.ok()) return;
176 ::tensorflow::Node* ret;
177 const auto unique_name = scope.GetUniqueNameForOp("RemoteCall");
178 auto builder = ::tensorflow::NodeBuilder(unique_name, "RemoteCall")
179 .Input(_target)
180 .Input(_args)
181 .Attr("Tout", Tout)
182 .Attr("f", f)
183 ;
184 scope.UpdateBuilder(&builder);
185 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
186 if (!scope.ok()) return;
187 scope.UpdateStatus(scope.DoShapeInference(ret));
188 this->operation = Operation(ret);
189 for (int32 i = 0; i < ret->num_outputs(); ++i)
190 this->output.push_back(Output(ret, i));
191}
192
193StatefulPartitionedCall::StatefulPartitionedCall(const ::tensorflow::Scope&
194 scope, ::tensorflow::InputList
195 args, const DataTypeSlice&
196 Tout, const NameAttrList& f,
197 const
198 StatefulPartitionedCall::Attrs&
199 attrs) {
200 if (!scope.ok()) return;
201 auto _args = ::tensorflow::ops::AsNodeOutList(scope, args);
202 if (!scope.ok()) return;
203 ::tensorflow::Node* ret;
204 const auto unique_name = scope.GetUniqueNameForOp("StatefulPartitionedCall");
205 auto builder = ::tensorflow::NodeBuilder(unique_name, "StatefulPartitionedCall")
206 .Input(_args)
207 .Attr("Tout", Tout)
208 .Attr("f", f)
209 .Attr("config", attrs.config_)
210 .Attr("config_proto", attrs.config_proto_)
211 .Attr("executor_type", attrs.executor_type_)
212 ;
213 scope.UpdateBuilder(&builder);
214 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
215 if (!scope.ok()) return;
216 scope.UpdateStatus(scope.DoShapeInference(ret));
217 this->operation = Operation(ret);
218 for (int32 i = 0; i < ret->num_outputs(); ++i)
219 this->output.push_back(Output(ret, i));
220}
221
222StatefulPartitionedCall::StatefulPartitionedCall(const ::tensorflow::Scope&
223 scope, ::tensorflow::InputList
224 args, const DataTypeSlice&
225 Tout, const NameAttrList& f)
226 : StatefulPartitionedCall(scope, args, Tout, f, StatefulPartitionedCall::Attrs()) {}
227
228StatelessCase::StatelessCase(const ::tensorflow::Scope& scope,
229 ::tensorflow::Input branch_index,
230 ::tensorflow::InputList input, const
231 DataTypeSlice& Tout, const
232 gtl::ArraySlice<NameAttrList>& branches, const
233 StatelessCase::Attrs& attrs) {
234 if (!scope.ok()) return;
235 auto _branch_index = ::tensorflow::ops::AsNodeOut(scope, branch_index);
236 if (!scope.ok()) return;
237 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
238 if (!scope.ok()) return;
239 ::tensorflow::Node* ret;
240 const auto unique_name = scope.GetUniqueNameForOp("StatelessCase");
241 auto builder = ::tensorflow::NodeBuilder(unique_name, "StatelessCase")
242 .Input(_branch_index)
243 .Input(_input)
244 .Attr("Tout", Tout)
245 .Attr("branches", branches)
246 .Attr("output_shapes", attrs.output_shapes_)
247 ;
248 scope.UpdateBuilder(&builder);
249 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
250 if (!scope.ok()) return;
251 scope.UpdateStatus(scope.DoShapeInference(ret));
252 this->operation = Operation(ret);
253 for (int32 i = 0; i < ret->num_outputs(); ++i)
254 this->output.push_back(Output(ret, i));
255}
256
257StatelessCase::StatelessCase(const ::tensorflow::Scope& scope,
258 ::tensorflow::Input branch_index,
259 ::tensorflow::InputList input, const
260 DataTypeSlice& Tout, const
261 gtl::ArraySlice<NameAttrList>& branches)
262 : StatelessCase(scope, branch_index, input, Tout, branches, StatelessCase::Attrs()) {}
263
264StatelessIf::StatelessIf(const ::tensorflow::Scope& scope, ::tensorflow::Input
265 cond, ::tensorflow::InputList input, const
266 DataTypeSlice& Tout, const NameAttrList& then_branch,
267 const NameAttrList& else_branch, const
268 StatelessIf::Attrs& attrs) {
269 if (!scope.ok()) return;
270 auto _cond = ::tensorflow::ops::AsNodeOut(scope, cond);
271 if (!scope.ok()) return;
272 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
273 if (!scope.ok()) return;
274 ::tensorflow::Node* ret;
275 const auto unique_name = scope.GetUniqueNameForOp("StatelessIf");
276 auto builder = ::tensorflow::NodeBuilder(unique_name, "StatelessIf")
277 .Input(_cond)
278 .Input(_input)
279 .Attr("Tout", Tout)
280 .Attr("then_branch", then_branch)
281 .Attr("else_branch", else_branch)
282 .Attr("output_shapes", attrs.output_shapes_)
283 ;
284 scope.UpdateBuilder(&builder);
285 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
286 if (!scope.ok()) return;
287 scope.UpdateStatus(scope.DoShapeInference(ret));
288 this->operation = Operation(ret);
289 for (int32 i = 0; i < ret->num_outputs(); ++i)
290 this->output.push_back(Output(ret, i));
291}
292
293StatelessIf::StatelessIf(const ::tensorflow::Scope& scope, ::tensorflow::Input
294 cond, ::tensorflow::InputList input, const
295 DataTypeSlice& Tout, const NameAttrList& then_branch,
296 const NameAttrList& else_branch)
297 : StatelessIf(scope, cond, input, Tout, then_branch, else_branch, StatelessIf::Attrs()) {}
298
299StatelessWhile::StatelessWhile(const ::tensorflow::Scope& scope,
300 ::tensorflow::InputList input, const
301 NameAttrList& cond, const NameAttrList& body,
302 const StatelessWhile::Attrs& attrs) {
303 if (!scope.ok()) return;
304 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
305 if (!scope.ok()) return;
306 ::tensorflow::Node* ret;
307 const auto unique_name = scope.GetUniqueNameForOp("StatelessWhile");
308 auto builder = ::tensorflow::NodeBuilder(unique_name, "StatelessWhile")
309 .Input(_input)
310 .Attr("cond", cond)
311 .Attr("body", body)
312 .Attr("output_shapes", attrs.output_shapes_)
313 .Attr("parallel_iterations", attrs.parallel_iterations_)
314 ;
315 scope.UpdateBuilder(&builder);
316 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
317 if (!scope.ok()) return;
318 scope.UpdateStatus(scope.DoShapeInference(ret));
319 this->operation = Operation(ret);
320 for (int32 i = 0; i < ret->num_outputs(); ++i)
321 this->output.push_back(Output(ret, i));
322}
323
324StatelessWhile::StatelessWhile(const ::tensorflow::Scope& scope,
325 ::tensorflow::InputList input, const
326 NameAttrList& cond, const NameAttrList& body)
327 : StatelessWhile(scope, input, cond, body, StatelessWhile::Attrs()) {}
328
329SymbolicGradient::SymbolicGradient(const ::tensorflow::Scope& scope,
330 ::tensorflow::InputList input, const
331 DataTypeSlice& Tout, const NameAttrList& f) {
332 if (!scope.ok()) return;
333 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
334 if (!scope.ok()) return;
335 ::tensorflow::Node* ret;
336 const auto unique_name = scope.GetUniqueNameForOp("SymbolicGradient");
337 auto builder = ::tensorflow::NodeBuilder(unique_name, "SymbolicGradient")
338 .Input(_input)
339 .Attr("Tout", Tout)
340 .Attr("f", f)
341 ;
342 scope.UpdateBuilder(&builder);
343 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
344 if (!scope.ok()) return;
345 scope.UpdateStatus(scope.DoShapeInference(ret));
346 this->operation = Operation(ret);
347 for (int32 i = 0; i < ret->num_outputs(); ++i)
348 this->output.push_back(Output(ret, i));
349}
350
351ToBool::ToBool(const ::tensorflow::Scope& scope, ::tensorflow::Input input) {
352 if (!scope.ok()) return;
353 auto _input = ::tensorflow::ops::AsNodeOut(scope, input);
354 if (!scope.ok()) return;
355 ::tensorflow::Node* ret;
356 const auto unique_name = scope.GetUniqueNameForOp("ToBool");
357 auto builder = ::tensorflow::NodeBuilder(unique_name, "ToBool")
358 .Input(_input)
359 ;
360 scope.UpdateBuilder(&builder);
361 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
362 if (!scope.ok()) return;
363 scope.UpdateStatus(scope.DoShapeInference(ret));
364 this->operation = Operation(ret);
365 this->output = Output(ret, 0);
366}
367
368While::While(const ::tensorflow::Scope& scope, ::tensorflow::InputList input,
369 const NameAttrList& cond, const NameAttrList& body, const
370 While::Attrs& attrs) {
371 if (!scope.ok()) return;
372 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
373 if (!scope.ok()) return;
374 ::tensorflow::Node* ret;
375 const auto unique_name = scope.GetUniqueNameForOp("While");
376 auto builder = ::tensorflow::NodeBuilder(unique_name, "While")
377 .Input(_input)
378 .Attr("cond", cond)
379 .Attr("body", body)
380 .Attr("output_shapes", attrs.output_shapes_)
381 .Attr("parallel_iterations", attrs.parallel_iterations_)
382 ;
383 scope.UpdateBuilder(&builder);
384 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
385 if (!scope.ok()) return;
386 scope.UpdateStatus(scope.DoShapeInference(ret));
387 this->operation = Operation(ret);
388 for (int32 i = 0; i < ret->num_outputs(); ++i)
389 this->output.push_back(Output(ret, i));
390}
391
392While::While(const ::tensorflow::Scope& scope, ::tensorflow::InputList input,
393 const NameAttrList& cond, const NameAttrList& body)
394 : While(scope, input, cond, body, While::Attrs()) {}
395
396_If::_If(const ::tensorflow::Scope& scope, ::tensorflow::Input cond,
397 ::tensorflow::InputList input, const DataTypeSlice& Tout, const
398 NameAttrList& then_branch, const NameAttrList& else_branch) {
399 if (!scope.ok()) return;
400 auto _cond = ::tensorflow::ops::AsNodeOut(scope, cond);
401 if (!scope.ok()) return;
402 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
403 if (!scope.ok()) return;
404 ::tensorflow::Node* ret;
405 const auto unique_name = scope.GetUniqueNameForOp("_If");
406 auto builder = ::tensorflow::NodeBuilder(unique_name, "_If")
407 .Input(_cond)
408 .Input(_input)
409 .Attr("Tout", Tout)
410 .Attr("then_branch", then_branch)
411 .Attr("else_branch", else_branch)
412 ;
413 scope.UpdateBuilder(&builder);
414 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
415 if (!scope.ok()) return;
416 scope.UpdateStatus(scope.DoShapeInference(ret));
417 this->operation = Operation(ret);
418 for (int32 i = 0; i < ret->num_outputs(); ++i)
419 this->output.push_back(Output(ret, i));
420}
421
422_While::_While(const ::tensorflow::Scope& scope, ::tensorflow::InputList input,
423 const NameAttrList& cond, const NameAttrList& body) {
424 if (!scope.ok()) return;
425 auto _input = ::tensorflow::ops::AsNodeOutList(scope, input);
426 if (!scope.ok()) return;
427 ::tensorflow::Node* ret;
428 const auto unique_name = scope.GetUniqueNameForOp("_While");
429 auto builder = ::tensorflow::NodeBuilder(unique_name, "_While")
430 .Input(_input)
431 .Attr("cond", cond)
432 .Attr("body", body)
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 for (int32 i = 0; i < ret->num_outputs(); ++i)
440 this->output.push_back(Output(ret, i));
441}
442
443/// @}
444
445} // namespace ops
446} // namespace tensorflow
447