1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/state_ops.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | |
10 | Assign::Assign(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
11 | ::tensorflow::Input value, const Assign::Attrs& attrs) { |
12 | if (!scope.ok()) return; |
13 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
14 | if (!scope.ok()) return; |
15 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
16 | if (!scope.ok()) return; |
17 | ::tensorflow::Node* ret; |
18 | const auto unique_name = scope.GetUniqueNameForOp("Assign" ); |
19 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Assign" ) |
20 | .Input(_ref) |
21 | .Input(_value) |
22 | .Attr("validate_shape" , attrs.validate_shape_) |
23 | .Attr("use_locking" , attrs.use_locking_) |
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 | this->output_ref = Output(ret, 0); |
31 | } |
32 | |
33 | Assign::Assign(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
34 | ::tensorflow::Input value) |
35 | : Assign(scope, ref, value, Assign::Attrs()) {} |
36 | |
37 | AssignAdd::AssignAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
38 | ::tensorflow::Input value, const AssignAdd::Attrs& attrs) { |
39 | if (!scope.ok()) return; |
40 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
41 | if (!scope.ok()) return; |
42 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
43 | if (!scope.ok()) return; |
44 | ::tensorflow::Node* ret; |
45 | const auto unique_name = scope.GetUniqueNameForOp("AssignAdd" ); |
46 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AssignAdd" ) |
47 | .Input(_ref) |
48 | .Input(_value) |
49 | .Attr("use_locking" , attrs.use_locking_) |
50 | ; |
51 | scope.UpdateBuilder(&builder); |
52 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
53 | if (!scope.ok()) return; |
54 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
55 | this->operation = Operation(ret); |
56 | this->output_ref = Output(ret, 0); |
57 | } |
58 | |
59 | AssignAdd::AssignAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
60 | ::tensorflow::Input value) |
61 | : AssignAdd(scope, ref, value, AssignAdd::Attrs()) {} |
62 | |
63 | AssignSub::AssignSub(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
64 | ::tensorflow::Input value, const AssignSub::Attrs& attrs) { |
65 | if (!scope.ok()) return; |
66 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
67 | if (!scope.ok()) return; |
68 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
69 | if (!scope.ok()) return; |
70 | ::tensorflow::Node* ret; |
71 | const auto unique_name = scope.GetUniqueNameForOp("AssignSub" ); |
72 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AssignSub" ) |
73 | .Input(_ref) |
74 | .Input(_value) |
75 | .Attr("use_locking" , attrs.use_locking_) |
76 | ; |
77 | scope.UpdateBuilder(&builder); |
78 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
79 | if (!scope.ok()) return; |
80 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
81 | this->operation = Operation(ret); |
82 | this->output_ref = Output(ret, 0); |
83 | } |
84 | |
85 | AssignSub::AssignSub(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
86 | ::tensorflow::Input value) |
87 | : AssignSub(scope, ref, value, AssignSub::Attrs()) {} |
88 | |
89 | CountUpTo::CountUpTo(const ::tensorflow::Scope& scope, ::tensorflow::Input ref, |
90 | int64 limit) { |
91 | if (!scope.ok()) return; |
92 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
93 | if (!scope.ok()) return; |
94 | ::tensorflow::Node* ret; |
95 | const auto unique_name = scope.GetUniqueNameForOp("CountUpTo" ); |
96 | auto builder = ::tensorflow::NodeBuilder(unique_name, "CountUpTo" ) |
97 | .Input(_ref) |
98 | .Attr("limit" , limit) |
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 | this->output = Output(ret, 0); |
106 | } |
107 | |
108 | DestroyTemporaryVariable::DestroyTemporaryVariable(const ::tensorflow::Scope& |
109 | scope, ::tensorflow::Input |
110 | ref, StringPiece var_name) { |
111 | if (!scope.ok()) return; |
112 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
113 | if (!scope.ok()) return; |
114 | ::tensorflow::Node* ret; |
115 | const auto unique_name = scope.GetUniqueNameForOp("DestroyTemporaryVariable" ); |
116 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DestroyTemporaryVariable" ) |
117 | .Input(_ref) |
118 | .Attr("var_name" , var_name) |
119 | ; |
120 | scope.UpdateBuilder(&builder); |
121 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
122 | if (!scope.ok()) return; |
123 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
124 | this->operation = Operation(ret); |
125 | this->value = Output(ret, 0); |
126 | } |
127 | |
128 | IsVariableInitialized::IsVariableInitialized(const ::tensorflow::Scope& scope, |
129 | ::tensorflow::Input ref) { |
130 | if (!scope.ok()) return; |
131 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
132 | if (!scope.ok()) return; |
133 | ::tensorflow::Node* ret; |
134 | const auto unique_name = scope.GetUniqueNameForOp("IsVariableInitialized" ); |
135 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IsVariableInitialized" ) |
136 | .Input(_ref) |
137 | ; |
138 | scope.UpdateBuilder(&builder); |
139 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
140 | if (!scope.ok()) return; |
141 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
142 | this->operation = Operation(ret); |
143 | this->is_initialized = Output(ret, 0); |
144 | } |
145 | |
146 | ResourceCountUpTo::ResourceCountUpTo(const ::tensorflow::Scope& scope, |
147 | ::tensorflow::Input resource, int64 limit, |
148 | DataType T) { |
149 | if (!scope.ok()) return; |
150 | auto _resource = ::tensorflow::ops::AsNodeOut(scope, resource); |
151 | if (!scope.ok()) return; |
152 | ::tensorflow::Node* ret; |
153 | const auto unique_name = scope.GetUniqueNameForOp("ResourceCountUpTo" ); |
154 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceCountUpTo" ) |
155 | .Input(_resource) |
156 | .Attr("limit" , limit) |
157 | .Attr("T" , T) |
158 | ; |
159 | scope.UpdateBuilder(&builder); |
160 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
161 | if (!scope.ok()) return; |
162 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
163 | this->operation = Operation(ret); |
164 | this->output = Output(ret, 0); |
165 | } |
166 | |
167 | ResourceScatterNdAdd::ResourceScatterNdAdd(const ::tensorflow::Scope& scope, |
168 | ::tensorflow::Input ref, |
169 | ::tensorflow::Input indices, |
170 | ::tensorflow::Input updates, const |
171 | ResourceScatterNdAdd::Attrs& attrs) { |
172 | if (!scope.ok()) return; |
173 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
174 | if (!scope.ok()) return; |
175 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
176 | if (!scope.ok()) return; |
177 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
178 | if (!scope.ok()) return; |
179 | ::tensorflow::Node* ret; |
180 | const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterNdAdd" ); |
181 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterNdAdd" ) |
182 | .Input(_ref) |
183 | .Input(_indices) |
184 | .Input(_updates) |
185 | .Attr("use_locking" , attrs.use_locking_) |
186 | ; |
187 | scope.UpdateBuilder(&builder); |
188 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
189 | if (!scope.ok()) return; |
190 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
191 | this->operation = Operation(ret); |
192 | return; |
193 | } |
194 | |
195 | ResourceScatterNdAdd::ResourceScatterNdAdd(const ::tensorflow::Scope& scope, |
196 | ::tensorflow::Input ref, |
197 | ::tensorflow::Input indices, |
198 | ::tensorflow::Input updates) |
199 | : ResourceScatterNdAdd(scope, ref, indices, updates, ResourceScatterNdAdd::Attrs()) {} |
200 | |
201 | ResourceScatterNdMax::ResourceScatterNdMax(const ::tensorflow::Scope& scope, |
202 | ::tensorflow::Input ref, |
203 | ::tensorflow::Input indices, |
204 | ::tensorflow::Input updates, const |
205 | ResourceScatterNdMax::Attrs& attrs) { |
206 | if (!scope.ok()) return; |
207 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
208 | if (!scope.ok()) return; |
209 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
210 | if (!scope.ok()) return; |
211 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
212 | if (!scope.ok()) return; |
213 | ::tensorflow::Node* ret; |
214 | const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterNdMax" ); |
215 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterNdMax" ) |
216 | .Input(_ref) |
217 | .Input(_indices) |
218 | .Input(_updates) |
219 | .Attr("use_locking" , attrs.use_locking_) |
220 | ; |
221 | scope.UpdateBuilder(&builder); |
222 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
223 | if (!scope.ok()) return; |
224 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
225 | this->operation = Operation(ret); |
226 | return; |
227 | } |
228 | |
229 | ResourceScatterNdMax::ResourceScatterNdMax(const ::tensorflow::Scope& scope, |
230 | ::tensorflow::Input ref, |
231 | ::tensorflow::Input indices, |
232 | ::tensorflow::Input updates) |
233 | : ResourceScatterNdMax(scope, ref, indices, updates, ResourceScatterNdMax::Attrs()) {} |
234 | |
235 | ResourceScatterNdMin::ResourceScatterNdMin(const ::tensorflow::Scope& scope, |
236 | ::tensorflow::Input ref, |
237 | ::tensorflow::Input indices, |
238 | ::tensorflow::Input updates, const |
239 | ResourceScatterNdMin::Attrs& attrs) { |
240 | if (!scope.ok()) return; |
241 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
242 | if (!scope.ok()) return; |
243 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
244 | if (!scope.ok()) return; |
245 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
246 | if (!scope.ok()) return; |
247 | ::tensorflow::Node* ret; |
248 | const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterNdMin" ); |
249 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterNdMin" ) |
250 | .Input(_ref) |
251 | .Input(_indices) |
252 | .Input(_updates) |
253 | .Attr("use_locking" , attrs.use_locking_) |
254 | ; |
255 | scope.UpdateBuilder(&builder); |
256 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
257 | if (!scope.ok()) return; |
258 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
259 | this->operation = Operation(ret); |
260 | return; |
261 | } |
262 | |
263 | ResourceScatterNdMin::ResourceScatterNdMin(const ::tensorflow::Scope& scope, |
264 | ::tensorflow::Input ref, |
265 | ::tensorflow::Input indices, |
266 | ::tensorflow::Input updates) |
267 | : ResourceScatterNdMin(scope, ref, indices, updates, ResourceScatterNdMin::Attrs()) {} |
268 | |
269 | ResourceScatterNdSub::ResourceScatterNdSub(const ::tensorflow::Scope& scope, |
270 | ::tensorflow::Input ref, |
271 | ::tensorflow::Input indices, |
272 | ::tensorflow::Input updates, const |
273 | ResourceScatterNdSub::Attrs& attrs) { |
274 | if (!scope.ok()) return; |
275 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
276 | if (!scope.ok()) return; |
277 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
278 | if (!scope.ok()) return; |
279 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
280 | if (!scope.ok()) return; |
281 | ::tensorflow::Node* ret; |
282 | const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterNdSub" ); |
283 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterNdSub" ) |
284 | .Input(_ref) |
285 | .Input(_indices) |
286 | .Input(_updates) |
287 | .Attr("use_locking" , attrs.use_locking_) |
288 | ; |
289 | scope.UpdateBuilder(&builder); |
290 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
291 | if (!scope.ok()) return; |
292 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
293 | this->operation = Operation(ret); |
294 | return; |
295 | } |
296 | |
297 | ResourceScatterNdSub::ResourceScatterNdSub(const ::tensorflow::Scope& scope, |
298 | ::tensorflow::Input ref, |
299 | ::tensorflow::Input indices, |
300 | ::tensorflow::Input updates) |
301 | : ResourceScatterNdSub(scope, ref, indices, updates, ResourceScatterNdSub::Attrs()) {} |
302 | |
303 | ResourceScatterNdUpdate::ResourceScatterNdUpdate(const ::tensorflow::Scope& |
304 | scope, ::tensorflow::Input |
305 | ref, ::tensorflow::Input |
306 | indices, ::tensorflow::Input |
307 | updates, const |
308 | ResourceScatterNdUpdate::Attrs& |
309 | attrs) { |
310 | if (!scope.ok()) return; |
311 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
312 | if (!scope.ok()) return; |
313 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
314 | if (!scope.ok()) return; |
315 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
316 | if (!scope.ok()) return; |
317 | ::tensorflow::Node* ret; |
318 | const auto unique_name = scope.GetUniqueNameForOp("ResourceScatterNdUpdate" ); |
319 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceScatterNdUpdate" ) |
320 | .Input(_ref) |
321 | .Input(_indices) |
322 | .Input(_updates) |
323 | .Attr("use_locking" , attrs.use_locking_) |
324 | ; |
325 | scope.UpdateBuilder(&builder); |
326 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
327 | if (!scope.ok()) return; |
328 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
329 | this->operation = Operation(ret); |
330 | return; |
331 | } |
332 | |
333 | ResourceScatterNdUpdate::ResourceScatterNdUpdate(const ::tensorflow::Scope& |
334 | scope, ::tensorflow::Input |
335 | ref, ::tensorflow::Input |
336 | indices, ::tensorflow::Input |
337 | updates) |
338 | : ResourceScatterNdUpdate(scope, ref, indices, updates, ResourceScatterNdUpdate::Attrs()) {} |
339 | |
340 | ScatterAdd::ScatterAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input |
341 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
342 | updates, const ScatterAdd::Attrs& attrs) { |
343 | if (!scope.ok()) return; |
344 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
345 | if (!scope.ok()) return; |
346 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
347 | if (!scope.ok()) return; |
348 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
349 | if (!scope.ok()) return; |
350 | ::tensorflow::Node* ret; |
351 | const auto unique_name = scope.GetUniqueNameForOp("ScatterAdd" ); |
352 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterAdd" ) |
353 | .Input(_ref) |
354 | .Input(_indices) |
355 | .Input(_updates) |
356 | .Attr("use_locking" , attrs.use_locking_) |
357 | ; |
358 | scope.UpdateBuilder(&builder); |
359 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
360 | if (!scope.ok()) return; |
361 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
362 | this->operation = Operation(ret); |
363 | this->output_ref = Output(ret, 0); |
364 | } |
365 | |
366 | ScatterAdd::ScatterAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input |
367 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
368 | updates) |
369 | : ScatterAdd(scope, ref, indices, updates, ScatterAdd::Attrs()) {} |
370 | |
371 | ScatterDiv::ScatterDiv(const ::tensorflow::Scope& scope, ::tensorflow::Input |
372 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
373 | updates, const ScatterDiv::Attrs& attrs) { |
374 | if (!scope.ok()) return; |
375 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
376 | if (!scope.ok()) return; |
377 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
378 | if (!scope.ok()) return; |
379 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
380 | if (!scope.ok()) return; |
381 | ::tensorflow::Node* ret; |
382 | const auto unique_name = scope.GetUniqueNameForOp("ScatterDiv" ); |
383 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterDiv" ) |
384 | .Input(_ref) |
385 | .Input(_indices) |
386 | .Input(_updates) |
387 | .Attr("use_locking" , attrs.use_locking_) |
388 | ; |
389 | scope.UpdateBuilder(&builder); |
390 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
391 | if (!scope.ok()) return; |
392 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
393 | this->operation = Operation(ret); |
394 | this->output_ref = Output(ret, 0); |
395 | } |
396 | |
397 | ScatterDiv::ScatterDiv(const ::tensorflow::Scope& scope, ::tensorflow::Input |
398 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
399 | updates) |
400 | : ScatterDiv(scope, ref, indices, updates, ScatterDiv::Attrs()) {} |
401 | |
402 | ScatterMax::ScatterMax(const ::tensorflow::Scope& scope, ::tensorflow::Input |
403 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
404 | updates, const ScatterMax::Attrs& attrs) { |
405 | if (!scope.ok()) return; |
406 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
407 | if (!scope.ok()) return; |
408 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
409 | if (!scope.ok()) return; |
410 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
411 | if (!scope.ok()) return; |
412 | ::tensorflow::Node* ret; |
413 | const auto unique_name = scope.GetUniqueNameForOp("ScatterMax" ); |
414 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterMax" ) |
415 | .Input(_ref) |
416 | .Input(_indices) |
417 | .Input(_updates) |
418 | .Attr("use_locking" , attrs.use_locking_) |
419 | ; |
420 | scope.UpdateBuilder(&builder); |
421 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
422 | if (!scope.ok()) return; |
423 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
424 | this->operation = Operation(ret); |
425 | this->output_ref = Output(ret, 0); |
426 | } |
427 | |
428 | ScatterMax::ScatterMax(const ::tensorflow::Scope& scope, ::tensorflow::Input |
429 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
430 | updates) |
431 | : ScatterMax(scope, ref, indices, updates, ScatterMax::Attrs()) {} |
432 | |
433 | ScatterMin::ScatterMin(const ::tensorflow::Scope& scope, ::tensorflow::Input |
434 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
435 | updates, const ScatterMin::Attrs& attrs) { |
436 | if (!scope.ok()) return; |
437 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
438 | if (!scope.ok()) return; |
439 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
440 | if (!scope.ok()) return; |
441 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
442 | if (!scope.ok()) return; |
443 | ::tensorflow::Node* ret; |
444 | const auto unique_name = scope.GetUniqueNameForOp("ScatterMin" ); |
445 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterMin" ) |
446 | .Input(_ref) |
447 | .Input(_indices) |
448 | .Input(_updates) |
449 | .Attr("use_locking" , attrs.use_locking_) |
450 | ; |
451 | scope.UpdateBuilder(&builder); |
452 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
453 | if (!scope.ok()) return; |
454 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
455 | this->operation = Operation(ret); |
456 | this->output_ref = Output(ret, 0); |
457 | } |
458 | |
459 | ScatterMin::ScatterMin(const ::tensorflow::Scope& scope, ::tensorflow::Input |
460 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
461 | updates) |
462 | : ScatterMin(scope, ref, indices, updates, ScatterMin::Attrs()) {} |
463 | |
464 | ScatterMul::ScatterMul(const ::tensorflow::Scope& scope, ::tensorflow::Input |
465 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
466 | updates, const ScatterMul::Attrs& attrs) { |
467 | if (!scope.ok()) return; |
468 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
469 | if (!scope.ok()) return; |
470 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
471 | if (!scope.ok()) return; |
472 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
473 | if (!scope.ok()) return; |
474 | ::tensorflow::Node* ret; |
475 | const auto unique_name = scope.GetUniqueNameForOp("ScatterMul" ); |
476 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterMul" ) |
477 | .Input(_ref) |
478 | .Input(_indices) |
479 | .Input(_updates) |
480 | .Attr("use_locking" , attrs.use_locking_) |
481 | ; |
482 | scope.UpdateBuilder(&builder); |
483 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
484 | if (!scope.ok()) return; |
485 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
486 | this->operation = Operation(ret); |
487 | this->output_ref = Output(ret, 0); |
488 | } |
489 | |
490 | ScatterMul::ScatterMul(const ::tensorflow::Scope& scope, ::tensorflow::Input |
491 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
492 | updates) |
493 | : ScatterMul(scope, ref, indices, updates, ScatterMul::Attrs()) {} |
494 | |
495 | ScatterNdAdd::ScatterNdAdd(const ::tensorflow::Scope& scope, |
496 | ::tensorflow::Input ref, ::tensorflow::Input |
497 | indices, ::tensorflow::Input updates, const |
498 | ScatterNdAdd::Attrs& attrs) { |
499 | if (!scope.ok()) return; |
500 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
501 | if (!scope.ok()) return; |
502 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
503 | if (!scope.ok()) return; |
504 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
505 | if (!scope.ok()) return; |
506 | ::tensorflow::Node* ret; |
507 | const auto unique_name = scope.GetUniqueNameForOp("ScatterNdAdd" ); |
508 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterNdAdd" ) |
509 | .Input(_ref) |
510 | .Input(_indices) |
511 | .Input(_updates) |
512 | .Attr("use_locking" , attrs.use_locking_) |
513 | ; |
514 | scope.UpdateBuilder(&builder); |
515 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
516 | if (!scope.ok()) return; |
517 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
518 | this->operation = Operation(ret); |
519 | this->output_ref = Output(ret, 0); |
520 | } |
521 | |
522 | ScatterNdAdd::ScatterNdAdd(const ::tensorflow::Scope& scope, |
523 | ::tensorflow::Input ref, ::tensorflow::Input |
524 | indices, ::tensorflow::Input updates) |
525 | : ScatterNdAdd(scope, ref, indices, updates, ScatterNdAdd::Attrs()) {} |
526 | |
527 | ScatterNdSub::ScatterNdSub(const ::tensorflow::Scope& scope, |
528 | ::tensorflow::Input ref, ::tensorflow::Input |
529 | indices, ::tensorflow::Input updates, const |
530 | ScatterNdSub::Attrs& attrs) { |
531 | if (!scope.ok()) return; |
532 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
533 | if (!scope.ok()) return; |
534 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
535 | if (!scope.ok()) return; |
536 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
537 | if (!scope.ok()) return; |
538 | ::tensorflow::Node* ret; |
539 | const auto unique_name = scope.GetUniqueNameForOp("ScatterNdSub" ); |
540 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterNdSub" ) |
541 | .Input(_ref) |
542 | .Input(_indices) |
543 | .Input(_updates) |
544 | .Attr("use_locking" , attrs.use_locking_) |
545 | ; |
546 | scope.UpdateBuilder(&builder); |
547 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
548 | if (!scope.ok()) return; |
549 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
550 | this->operation = Operation(ret); |
551 | this->output_ref = Output(ret, 0); |
552 | } |
553 | |
554 | ScatterNdSub::ScatterNdSub(const ::tensorflow::Scope& scope, |
555 | ::tensorflow::Input ref, ::tensorflow::Input |
556 | indices, ::tensorflow::Input updates) |
557 | : ScatterNdSub(scope, ref, indices, updates, ScatterNdSub::Attrs()) {} |
558 | |
559 | ScatterNdUpdate::ScatterNdUpdate(const ::tensorflow::Scope& scope, |
560 | ::tensorflow::Input ref, ::tensorflow::Input |
561 | indices, ::tensorflow::Input updates, const |
562 | ScatterNdUpdate::Attrs& attrs) { |
563 | if (!scope.ok()) return; |
564 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
565 | if (!scope.ok()) return; |
566 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
567 | if (!scope.ok()) return; |
568 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
569 | if (!scope.ok()) return; |
570 | ::tensorflow::Node* ret; |
571 | const auto unique_name = scope.GetUniqueNameForOp("ScatterNdUpdate" ); |
572 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterNdUpdate" ) |
573 | .Input(_ref) |
574 | .Input(_indices) |
575 | .Input(_updates) |
576 | .Attr("use_locking" , attrs.use_locking_) |
577 | ; |
578 | scope.UpdateBuilder(&builder); |
579 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
580 | if (!scope.ok()) return; |
581 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
582 | this->operation = Operation(ret); |
583 | this->output_ref = Output(ret, 0); |
584 | } |
585 | |
586 | ScatterNdUpdate::ScatterNdUpdate(const ::tensorflow::Scope& scope, |
587 | ::tensorflow::Input ref, ::tensorflow::Input |
588 | indices, ::tensorflow::Input updates) |
589 | : ScatterNdUpdate(scope, ref, indices, updates, ScatterNdUpdate::Attrs()) {} |
590 | |
591 | ScatterSub::ScatterSub(const ::tensorflow::Scope& scope, ::tensorflow::Input |
592 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
593 | updates, const ScatterSub::Attrs& attrs) { |
594 | if (!scope.ok()) return; |
595 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
596 | if (!scope.ok()) return; |
597 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
598 | if (!scope.ok()) return; |
599 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
600 | if (!scope.ok()) return; |
601 | ::tensorflow::Node* ret; |
602 | const auto unique_name = scope.GetUniqueNameForOp("ScatterSub" ); |
603 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterSub" ) |
604 | .Input(_ref) |
605 | .Input(_indices) |
606 | .Input(_updates) |
607 | .Attr("use_locking" , attrs.use_locking_) |
608 | ; |
609 | scope.UpdateBuilder(&builder); |
610 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
611 | if (!scope.ok()) return; |
612 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
613 | this->operation = Operation(ret); |
614 | this->output_ref = Output(ret, 0); |
615 | } |
616 | |
617 | ScatterSub::ScatterSub(const ::tensorflow::Scope& scope, ::tensorflow::Input |
618 | ref, ::tensorflow::Input indices, ::tensorflow::Input |
619 | updates) |
620 | : ScatterSub(scope, ref, indices, updates, ScatterSub::Attrs()) {} |
621 | |
622 | ScatterUpdate::ScatterUpdate(const ::tensorflow::Scope& scope, |
623 | ::tensorflow::Input ref, ::tensorflow::Input |
624 | indices, ::tensorflow::Input updates, const |
625 | ScatterUpdate::Attrs& attrs) { |
626 | if (!scope.ok()) return; |
627 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
628 | if (!scope.ok()) return; |
629 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
630 | if (!scope.ok()) return; |
631 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
632 | if (!scope.ok()) return; |
633 | ::tensorflow::Node* ret; |
634 | const auto unique_name = scope.GetUniqueNameForOp("ScatterUpdate" ); |
635 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterUpdate" ) |
636 | .Input(_ref) |
637 | .Input(_indices) |
638 | .Input(_updates) |
639 | .Attr("use_locking" , attrs.use_locking_) |
640 | ; |
641 | scope.UpdateBuilder(&builder); |
642 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
643 | if (!scope.ok()) return; |
644 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
645 | this->operation = Operation(ret); |
646 | this->output_ref = Output(ret, 0); |
647 | } |
648 | |
649 | ScatterUpdate::ScatterUpdate(const ::tensorflow::Scope& scope, |
650 | ::tensorflow::Input ref, ::tensorflow::Input |
651 | indices, ::tensorflow::Input updates) |
652 | : ScatterUpdate(scope, ref, indices, updates, ScatterUpdate::Attrs()) {} |
653 | |
654 | TemporaryVariable::TemporaryVariable(const ::tensorflow::Scope& scope, |
655 | PartialTensorShape shape, DataType dtype, |
656 | const TemporaryVariable::Attrs& attrs) { |
657 | if (!scope.ok()) return; |
658 | ::tensorflow::Node* ret; |
659 | const auto unique_name = scope.GetUniqueNameForOp("TemporaryVariable" ); |
660 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TemporaryVariable" ) |
661 | .Attr("shape" , shape) |
662 | .Attr("dtype" , dtype) |
663 | .Attr("var_name" , attrs.var_name_) |
664 | ; |
665 | scope.UpdateBuilder(&builder); |
666 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
667 | if (!scope.ok()) return; |
668 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
669 | this->operation = Operation(ret); |
670 | this->ref = Output(ret, 0); |
671 | } |
672 | |
673 | TemporaryVariable::TemporaryVariable(const ::tensorflow::Scope& scope, |
674 | PartialTensorShape shape, DataType dtype) |
675 | : TemporaryVariable(scope, shape, dtype, TemporaryVariable::Attrs()) {} |
676 | |
677 | Variable::Variable(const ::tensorflow::Scope& scope, PartialTensorShape shape, |
678 | DataType dtype, const Variable::Attrs& attrs) { |
679 | if (!scope.ok()) return; |
680 | ::tensorflow::Node* ret; |
681 | const auto unique_name = scope.GetUniqueNameForOp("Variable" ); |
682 | auto builder = ::tensorflow::NodeBuilder(unique_name, "VariableV2" ) |
683 | .Attr("shape" , shape) |
684 | .Attr("dtype" , dtype) |
685 | .Attr("container" , attrs.container_) |
686 | .Attr("shared_name" , attrs.shared_name_) |
687 | ; |
688 | scope.UpdateBuilder(&builder); |
689 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
690 | if (!scope.ok()) return; |
691 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
692 | this->operation = Operation(ret); |
693 | this->ref = Output(ret, 0); |
694 | } |
695 | |
696 | Variable::Variable(const ::tensorflow::Scope& scope, PartialTensorShape shape, |
697 | DataType dtype) |
698 | : Variable(scope, shape, dtype, Variable::Attrs()) {} |
699 | |
700 | /// @} |
701 | |
702 | } // namespace ops |
703 | } // namespace tensorflow |
704 | |