1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/array_ops.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | |
10 | BatchToSpace::BatchToSpace(const ::tensorflow::Scope& scope, |
11 | ::tensorflow::Input input, ::tensorflow::Input |
12 | crops, int64 block_size) { |
13 | if (!scope.ok()) return; |
14 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
15 | if (!scope.ok()) return; |
16 | auto _crops = ::tensorflow::ops::AsNodeOut(scope, crops); |
17 | if (!scope.ok()) return; |
18 | ::tensorflow::Node* ret; |
19 | const auto unique_name = scope.GetUniqueNameForOp("BatchToSpace" ); |
20 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BatchToSpace" ) |
21 | .Input(_input) |
22 | .Input(_crops) |
23 | .Attr("block_size" , block_size) |
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 = Output(ret, 0); |
31 | } |
32 | |
33 | BatchToSpaceND::BatchToSpaceND(const ::tensorflow::Scope& scope, |
34 | ::tensorflow::Input input, ::tensorflow::Input |
35 | block_shape, ::tensorflow::Input crops) { |
36 | if (!scope.ok()) return; |
37 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
38 | if (!scope.ok()) return; |
39 | auto _block_shape = ::tensorflow::ops::AsNodeOut(scope, block_shape); |
40 | if (!scope.ok()) return; |
41 | auto _crops = ::tensorflow::ops::AsNodeOut(scope, crops); |
42 | if (!scope.ok()) return; |
43 | ::tensorflow::Node* ret; |
44 | const auto unique_name = scope.GetUniqueNameForOp("BatchToSpaceND" ); |
45 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BatchToSpaceND" ) |
46 | .Input(_input) |
47 | .Input(_block_shape) |
48 | .Input(_crops) |
49 | ; |
50 | scope.UpdateBuilder(&builder); |
51 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
52 | if (!scope.ok()) return; |
53 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
54 | this->operation = Operation(ret); |
55 | this->output = Output(ret, 0); |
56 | } |
57 | |
58 | Bitcast::Bitcast(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
59 | DataType type) { |
60 | if (!scope.ok()) return; |
61 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
62 | if (!scope.ok()) return; |
63 | ::tensorflow::Node* ret; |
64 | const auto unique_name = scope.GetUniqueNameForOp("Bitcast" ); |
65 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Bitcast" ) |
66 | .Input(_input) |
67 | .Attr("type" , type) |
68 | ; |
69 | scope.UpdateBuilder(&builder); |
70 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
71 | if (!scope.ok()) return; |
72 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
73 | this->operation = Operation(ret); |
74 | this->output = Output(ret, 0); |
75 | } |
76 | |
77 | BroadcastDynamicShape::BroadcastDynamicShape(const ::tensorflow::Scope& scope, |
78 | ::tensorflow::Input s0, |
79 | ::tensorflow::Input s1) { |
80 | if (!scope.ok()) return; |
81 | auto _s0 = ::tensorflow::ops::AsNodeOut(scope, s0); |
82 | if (!scope.ok()) return; |
83 | auto _s1 = ::tensorflow::ops::AsNodeOut(scope, s1); |
84 | if (!scope.ok()) return; |
85 | ::tensorflow::Node* ret; |
86 | const auto unique_name = scope.GetUniqueNameForOp("BroadcastDynamicShape" ); |
87 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BroadcastArgs" ) |
88 | .Input(_s0) |
89 | .Input(_s1) |
90 | ; |
91 | scope.UpdateBuilder(&builder); |
92 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
93 | if (!scope.ok()) return; |
94 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
95 | this->operation = Operation(ret); |
96 | this->r0 = Output(ret, 0); |
97 | } |
98 | |
99 | BroadcastTo::BroadcastTo(const ::tensorflow::Scope& scope, ::tensorflow::Input |
100 | input, ::tensorflow::Input shape) { |
101 | if (!scope.ok()) return; |
102 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
103 | if (!scope.ok()) return; |
104 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
105 | if (!scope.ok()) return; |
106 | ::tensorflow::Node* ret; |
107 | const auto unique_name = scope.GetUniqueNameForOp("BroadcastTo" ); |
108 | auto builder = ::tensorflow::NodeBuilder(unique_name, "BroadcastTo" ) |
109 | .Input(_input) |
110 | .Input(_shape) |
111 | ; |
112 | scope.UpdateBuilder(&builder); |
113 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
114 | if (!scope.ok()) return; |
115 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
116 | this->operation = Operation(ret); |
117 | this->output = Output(ret, 0); |
118 | } |
119 | |
120 | CheckNumerics::CheckNumerics(const ::tensorflow::Scope& scope, |
121 | ::tensorflow::Input tensor, StringPiece message) { |
122 | if (!scope.ok()) return; |
123 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
124 | if (!scope.ok()) return; |
125 | ::tensorflow::Node* ret; |
126 | const auto unique_name = scope.GetUniqueNameForOp("CheckNumerics" ); |
127 | auto builder = ::tensorflow::NodeBuilder(unique_name, "CheckNumerics" ) |
128 | .Input(_tensor) |
129 | .Attr("message" , message) |
130 | ; |
131 | scope.UpdateBuilder(&builder); |
132 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
133 | if (!scope.ok()) return; |
134 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
135 | this->operation = Operation(ret); |
136 | this->output = Output(ret, 0); |
137 | } |
138 | |
139 | Concat::Concat(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
140 | values, ::tensorflow::Input axis) { |
141 | if (!scope.ok()) return; |
142 | auto _values = ::tensorflow::ops::AsNodeOutList(scope, values); |
143 | if (!scope.ok()) return; |
144 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
145 | if (!scope.ok()) return; |
146 | ::tensorflow::Node* ret; |
147 | const auto unique_name = scope.GetUniqueNameForOp("Concat" ); |
148 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ConcatV2" ) |
149 | .Input(_values) |
150 | .Input(_axis) |
151 | ; |
152 | scope.UpdateBuilder(&builder); |
153 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
154 | if (!scope.ok()) return; |
155 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
156 | this->operation = Operation(ret); |
157 | this->output = Output(ret, 0); |
158 | } |
159 | |
160 | ConjugateTranspose::ConjugateTranspose(const ::tensorflow::Scope& scope, |
161 | ::tensorflow::Input x, |
162 | ::tensorflow::Input perm) { |
163 | if (!scope.ok()) return; |
164 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
165 | if (!scope.ok()) return; |
166 | auto _perm = ::tensorflow::ops::AsNodeOut(scope, perm); |
167 | if (!scope.ok()) return; |
168 | ::tensorflow::Node* ret; |
169 | const auto unique_name = scope.GetUniqueNameForOp("ConjugateTranspose" ); |
170 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ConjugateTranspose" ) |
171 | .Input(_x) |
172 | .Input(_perm) |
173 | ; |
174 | scope.UpdateBuilder(&builder); |
175 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
176 | if (!scope.ok()) return; |
177 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
178 | this->operation = Operation(ret); |
179 | this->y = Output(ret, 0); |
180 | } |
181 | |
182 | DebugGradientIdentity::DebugGradientIdentity(const ::tensorflow::Scope& scope, |
183 | ::tensorflow::Input input) { |
184 | if (!scope.ok()) return; |
185 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
186 | if (!scope.ok()) return; |
187 | ::tensorflow::Node* ret; |
188 | const auto unique_name = scope.GetUniqueNameForOp("DebugGradientIdentity" ); |
189 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DebugGradientIdentity" ) |
190 | .Input(_input) |
191 | ; |
192 | scope.UpdateBuilder(&builder); |
193 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
194 | if (!scope.ok()) return; |
195 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
196 | this->operation = Operation(ret); |
197 | this->output = Output(ret, 0); |
198 | } |
199 | |
200 | DebugGradientRefIdentity::DebugGradientRefIdentity(const ::tensorflow::Scope& |
201 | scope, ::tensorflow::Input |
202 | input) { |
203 | if (!scope.ok()) return; |
204 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
205 | if (!scope.ok()) return; |
206 | ::tensorflow::Node* ret; |
207 | const auto unique_name = scope.GetUniqueNameForOp("DebugGradientRefIdentity" ); |
208 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DebugGradientRefIdentity" ) |
209 | .Input(_input) |
210 | ; |
211 | scope.UpdateBuilder(&builder); |
212 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
213 | if (!scope.ok()) return; |
214 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
215 | this->operation = Operation(ret); |
216 | this->output = Output(ret, 0); |
217 | } |
218 | |
219 | DeepCopy::DeepCopy(const ::tensorflow::Scope& scope, ::tensorflow::Input x) { |
220 | if (!scope.ok()) return; |
221 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
222 | if (!scope.ok()) return; |
223 | ::tensorflow::Node* ret; |
224 | const auto unique_name = scope.GetUniqueNameForOp("DeepCopy" ); |
225 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DeepCopy" ) |
226 | .Input(_x) |
227 | ; |
228 | scope.UpdateBuilder(&builder); |
229 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
230 | if (!scope.ok()) return; |
231 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
232 | this->operation = Operation(ret); |
233 | this->y = Output(ret, 0); |
234 | } |
235 | |
236 | DepthToSpace::DepthToSpace(const ::tensorflow::Scope& scope, |
237 | ::tensorflow::Input input, int64 block_size, const |
238 | DepthToSpace::Attrs& attrs) { |
239 | if (!scope.ok()) return; |
240 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
241 | if (!scope.ok()) return; |
242 | ::tensorflow::Node* ret; |
243 | const auto unique_name = scope.GetUniqueNameForOp("DepthToSpace" ); |
244 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DepthToSpace" ) |
245 | .Input(_input) |
246 | .Attr("block_size" , block_size) |
247 | .Attr("data_format" , attrs.data_format_) |
248 | ; |
249 | scope.UpdateBuilder(&builder); |
250 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
251 | if (!scope.ok()) return; |
252 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
253 | this->operation = Operation(ret); |
254 | this->output = Output(ret, 0); |
255 | } |
256 | |
257 | DepthToSpace::DepthToSpace(const ::tensorflow::Scope& scope, |
258 | ::tensorflow::Input input, int64 block_size) |
259 | : DepthToSpace(scope, input, block_size, DepthToSpace::Attrs()) {} |
260 | |
261 | Dequantize::Dequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input |
262 | input, ::tensorflow::Input min_range, |
263 | ::tensorflow::Input max_range, const Dequantize::Attrs& |
264 | attrs) { |
265 | if (!scope.ok()) return; |
266 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
267 | if (!scope.ok()) return; |
268 | auto _min_range = ::tensorflow::ops::AsNodeOut(scope, min_range); |
269 | if (!scope.ok()) return; |
270 | auto _max_range = ::tensorflow::ops::AsNodeOut(scope, max_range); |
271 | if (!scope.ok()) return; |
272 | ::tensorflow::Node* ret; |
273 | const auto unique_name = scope.GetUniqueNameForOp("Dequantize" ); |
274 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Dequantize" ) |
275 | .Input(_input) |
276 | .Input(_min_range) |
277 | .Input(_max_range) |
278 | .Attr("mode" , attrs.mode_) |
279 | .Attr("narrow_range" , attrs.narrow_range_) |
280 | .Attr("axis" , attrs.axis_) |
281 | .Attr("dtype" , attrs.dtype_) |
282 | ; |
283 | scope.UpdateBuilder(&builder); |
284 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
285 | if (!scope.ok()) return; |
286 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
287 | this->operation = Operation(ret); |
288 | this->output = Output(ret, 0); |
289 | } |
290 | |
291 | Dequantize::Dequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input |
292 | input, ::tensorflow::Input min_range, |
293 | ::tensorflow::Input max_range) |
294 | : Dequantize(scope, input, min_range, max_range, Dequantize::Attrs()) {} |
295 | |
296 | Diag::Diag(const ::tensorflow::Scope& scope, ::tensorflow::Input diagonal) { |
297 | if (!scope.ok()) return; |
298 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
299 | if (!scope.ok()) return; |
300 | ::tensorflow::Node* ret; |
301 | const auto unique_name = scope.GetUniqueNameForOp("Diag" ); |
302 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Diag" ) |
303 | .Input(_diagonal) |
304 | ; |
305 | scope.UpdateBuilder(&builder); |
306 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
307 | if (!scope.ok()) return; |
308 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
309 | this->operation = Operation(ret); |
310 | this->output = Output(ret, 0); |
311 | } |
312 | |
313 | DiagPart::DiagPart(const ::tensorflow::Scope& scope, ::tensorflow::Input input) { |
314 | if (!scope.ok()) return; |
315 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
316 | if (!scope.ok()) return; |
317 | ::tensorflow::Node* ret; |
318 | const auto unique_name = scope.GetUniqueNameForOp("DiagPart" ); |
319 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DiagPart" ) |
320 | .Input(_input) |
321 | ; |
322 | scope.UpdateBuilder(&builder); |
323 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
324 | if (!scope.ok()) return; |
325 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
326 | this->operation = Operation(ret); |
327 | this->diagonal = Output(ret, 0); |
328 | } |
329 | |
330 | EditDistance::EditDistance(const ::tensorflow::Scope& scope, |
331 | ::tensorflow::Input hypothesis_indices, |
332 | ::tensorflow::Input hypothesis_values, |
333 | ::tensorflow::Input hypothesis_shape, |
334 | ::tensorflow::Input truth_indices, |
335 | ::tensorflow::Input truth_values, |
336 | ::tensorflow::Input truth_shape, const |
337 | EditDistance::Attrs& attrs) { |
338 | if (!scope.ok()) return; |
339 | auto _hypothesis_indices = ::tensorflow::ops::AsNodeOut(scope, hypothesis_indices); |
340 | if (!scope.ok()) return; |
341 | auto _hypothesis_values = ::tensorflow::ops::AsNodeOut(scope, hypothesis_values); |
342 | if (!scope.ok()) return; |
343 | auto _hypothesis_shape = ::tensorflow::ops::AsNodeOut(scope, hypothesis_shape); |
344 | if (!scope.ok()) return; |
345 | auto _truth_indices = ::tensorflow::ops::AsNodeOut(scope, truth_indices); |
346 | if (!scope.ok()) return; |
347 | auto _truth_values = ::tensorflow::ops::AsNodeOut(scope, truth_values); |
348 | if (!scope.ok()) return; |
349 | auto _truth_shape = ::tensorflow::ops::AsNodeOut(scope, truth_shape); |
350 | if (!scope.ok()) return; |
351 | ::tensorflow::Node* ret; |
352 | const auto unique_name = scope.GetUniqueNameForOp("EditDistance" ); |
353 | auto builder = ::tensorflow::NodeBuilder(unique_name, "EditDistance" ) |
354 | .Input(_hypothesis_indices) |
355 | .Input(_hypothesis_values) |
356 | .Input(_hypothesis_shape) |
357 | .Input(_truth_indices) |
358 | .Input(_truth_values) |
359 | .Input(_truth_shape) |
360 | .Attr("normalize" , attrs.normalize_) |
361 | ; |
362 | scope.UpdateBuilder(&builder); |
363 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
364 | if (!scope.ok()) return; |
365 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
366 | this->operation = Operation(ret); |
367 | this->output = Output(ret, 0); |
368 | } |
369 | |
370 | EditDistance::EditDistance(const ::tensorflow::Scope& scope, |
371 | ::tensorflow::Input hypothesis_indices, |
372 | ::tensorflow::Input hypothesis_values, |
373 | ::tensorflow::Input hypothesis_shape, |
374 | ::tensorflow::Input truth_indices, |
375 | ::tensorflow::Input truth_values, |
376 | ::tensorflow::Input truth_shape) |
377 | : EditDistance(scope, hypothesis_indices, hypothesis_values, hypothesis_shape, truth_indices, truth_values, truth_shape, EditDistance::Attrs()) {} |
378 | |
379 | Empty::Empty(const ::tensorflow::Scope& scope, ::tensorflow::Input shape, |
380 | DataType dtype, const Empty::Attrs& attrs) { |
381 | if (!scope.ok()) return; |
382 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
383 | if (!scope.ok()) return; |
384 | ::tensorflow::Node* ret; |
385 | const auto unique_name = scope.GetUniqueNameForOp("Empty" ); |
386 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Empty" ) |
387 | .Input(_shape) |
388 | .Attr("dtype" , dtype) |
389 | .Attr("init" , attrs.init_) |
390 | ; |
391 | scope.UpdateBuilder(&builder); |
392 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
393 | if (!scope.ok()) return; |
394 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
395 | this->operation = Operation(ret); |
396 | this->output = Output(ret, 0); |
397 | } |
398 | |
399 | Empty::Empty(const ::tensorflow::Scope& scope, ::tensorflow::Input shape, |
400 | DataType dtype) |
401 | : Empty(scope, shape, dtype, Empty::Attrs()) {} |
402 | |
403 | EnsureShape::EnsureShape(const ::tensorflow::Scope& scope, ::tensorflow::Input |
404 | input, PartialTensorShape shape) { |
405 | if (!scope.ok()) return; |
406 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
407 | if (!scope.ok()) return; |
408 | ::tensorflow::Node* ret; |
409 | const auto unique_name = scope.GetUniqueNameForOp("EnsureShape" ); |
410 | auto builder = ::tensorflow::NodeBuilder(unique_name, "EnsureShape" ) |
411 | .Input(_input) |
412 | .Attr("shape" , shape) |
413 | ; |
414 | scope.UpdateBuilder(&builder); |
415 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
416 | if (!scope.ok()) return; |
417 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
418 | this->operation = Operation(ret); |
419 | this->output = Output(ret, 0); |
420 | } |
421 | |
422 | ExpandDims::ExpandDims(const ::tensorflow::Scope& scope, ::tensorflow::Input |
423 | input, ::tensorflow::Input axis) { |
424 | if (!scope.ok()) return; |
425 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
426 | if (!scope.ok()) return; |
427 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
428 | if (!scope.ok()) return; |
429 | ::tensorflow::Node* ret; |
430 | const auto unique_name = scope.GetUniqueNameForOp("ExpandDims" ); |
431 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ExpandDims" ) |
432 | .Input(_input) |
433 | .Input(_axis) |
434 | ; |
435 | scope.UpdateBuilder(&builder); |
436 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
437 | if (!scope.ok()) return; |
438 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
439 | this->operation = Operation(ret); |
440 | this->output = Output(ret, 0); |
441 | } |
442 | |
443 | ExtractImagePatches::(const ::tensorflow::Scope& scope, |
444 | ::tensorflow::Input images, const |
445 | gtl::ArraySlice<int>& ksizes, const |
446 | gtl::ArraySlice<int>& strides, const |
447 | gtl::ArraySlice<int>& rates, |
448 | StringPiece padding) { |
449 | if (!scope.ok()) return; |
450 | auto _images = ::tensorflow::ops::AsNodeOut(scope, images); |
451 | if (!scope.ok()) return; |
452 | ::tensorflow::Node* ret; |
453 | const auto unique_name = scope.GetUniqueNameForOp("ExtractImagePatches" ); |
454 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ExtractImagePatches" ) |
455 | .Input(_images) |
456 | .Attr("ksizes" , ksizes) |
457 | .Attr("strides" , strides) |
458 | .Attr("rates" , rates) |
459 | .Attr("padding" , padding) |
460 | ; |
461 | scope.UpdateBuilder(&builder); |
462 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
463 | if (!scope.ok()) return; |
464 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
465 | this->operation = Operation(ret); |
466 | this->patches = Output(ret, 0); |
467 | } |
468 | |
469 | ExtractVolumePatches::(const ::tensorflow::Scope& scope, |
470 | ::tensorflow::Input input, const |
471 | gtl::ArraySlice<int>& ksizes, const |
472 | gtl::ArraySlice<int>& strides, |
473 | StringPiece padding) { |
474 | if (!scope.ok()) return; |
475 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
476 | if (!scope.ok()) return; |
477 | ::tensorflow::Node* ret; |
478 | const auto unique_name = scope.GetUniqueNameForOp("ExtractVolumePatches" ); |
479 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ExtractVolumePatches" ) |
480 | .Input(_input) |
481 | .Attr("ksizes" , ksizes) |
482 | .Attr("strides" , strides) |
483 | .Attr("padding" , padding) |
484 | ; |
485 | scope.UpdateBuilder(&builder); |
486 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
487 | if (!scope.ok()) return; |
488 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
489 | this->operation = Operation(ret); |
490 | this->patches = Output(ret, 0); |
491 | } |
492 | |
493 | FakeQuantWithMinMaxArgs::FakeQuantWithMinMaxArgs(const ::tensorflow::Scope& |
494 | scope, ::tensorflow::Input |
495 | inputs, const |
496 | FakeQuantWithMinMaxArgs::Attrs& |
497 | attrs) { |
498 | if (!scope.ok()) return; |
499 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
500 | if (!scope.ok()) return; |
501 | ::tensorflow::Node* ret; |
502 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxArgs" ); |
503 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxArgs" ) |
504 | .Input(_inputs) |
505 | .Attr("min" , attrs.min_) |
506 | .Attr("max" , attrs.max_) |
507 | .Attr("num_bits" , attrs.num_bits_) |
508 | .Attr("narrow_range" , attrs.narrow_range_) |
509 | ; |
510 | scope.UpdateBuilder(&builder); |
511 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
512 | if (!scope.ok()) return; |
513 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
514 | this->operation = Operation(ret); |
515 | this->outputs = Output(ret, 0); |
516 | } |
517 | |
518 | FakeQuantWithMinMaxArgs::FakeQuantWithMinMaxArgs(const ::tensorflow::Scope& |
519 | scope, ::tensorflow::Input |
520 | inputs) |
521 | : FakeQuantWithMinMaxArgs(scope, inputs, FakeQuantWithMinMaxArgs::Attrs()) {} |
522 | |
523 | FakeQuantWithMinMaxArgsGradient::FakeQuantWithMinMaxArgsGradient(const |
524 | ::tensorflow::Scope& |
525 | scope, |
526 | ::tensorflow::Input |
527 | gradients, |
528 | ::tensorflow::Input |
529 | inputs, const |
530 | FakeQuantWithMinMaxArgsGradient::Attrs& |
531 | attrs) { |
532 | if (!scope.ok()) return; |
533 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
534 | if (!scope.ok()) return; |
535 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
536 | if (!scope.ok()) return; |
537 | ::tensorflow::Node* ret; |
538 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxArgsGradient" ); |
539 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxArgsGradient" ) |
540 | .Input(_gradients) |
541 | .Input(_inputs) |
542 | .Attr("min" , attrs.min_) |
543 | .Attr("max" , attrs.max_) |
544 | .Attr("num_bits" , attrs.num_bits_) |
545 | .Attr("narrow_range" , attrs.narrow_range_) |
546 | ; |
547 | scope.UpdateBuilder(&builder); |
548 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
549 | if (!scope.ok()) return; |
550 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
551 | this->operation = Operation(ret); |
552 | this->backprops = Output(ret, 0); |
553 | } |
554 | |
555 | FakeQuantWithMinMaxArgsGradient::FakeQuantWithMinMaxArgsGradient(const |
556 | ::tensorflow::Scope& |
557 | scope, |
558 | ::tensorflow::Input |
559 | gradients, |
560 | ::tensorflow::Input |
561 | inputs) |
562 | : FakeQuantWithMinMaxArgsGradient(scope, gradients, inputs, FakeQuantWithMinMaxArgsGradient::Attrs()) {} |
563 | |
564 | FakeQuantWithMinMaxVars::FakeQuantWithMinMaxVars(const ::tensorflow::Scope& |
565 | scope, ::tensorflow::Input |
566 | inputs, ::tensorflow::Input |
567 | min, ::tensorflow::Input max, |
568 | const |
569 | FakeQuantWithMinMaxVars::Attrs& |
570 | attrs) { |
571 | if (!scope.ok()) return; |
572 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
573 | if (!scope.ok()) return; |
574 | auto _min = ::tensorflow::ops::AsNodeOut(scope, min); |
575 | if (!scope.ok()) return; |
576 | auto _max = ::tensorflow::ops::AsNodeOut(scope, max); |
577 | if (!scope.ok()) return; |
578 | ::tensorflow::Node* ret; |
579 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxVars" ); |
580 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxVars" ) |
581 | .Input(_inputs) |
582 | .Input(_min) |
583 | .Input(_max) |
584 | .Attr("num_bits" , attrs.num_bits_) |
585 | .Attr("narrow_range" , attrs.narrow_range_) |
586 | ; |
587 | scope.UpdateBuilder(&builder); |
588 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
589 | if (!scope.ok()) return; |
590 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
591 | this->operation = Operation(ret); |
592 | this->outputs = Output(ret, 0); |
593 | } |
594 | |
595 | FakeQuantWithMinMaxVars::FakeQuantWithMinMaxVars(const ::tensorflow::Scope& |
596 | scope, ::tensorflow::Input |
597 | inputs, ::tensorflow::Input |
598 | min, ::tensorflow::Input max) |
599 | : FakeQuantWithMinMaxVars(scope, inputs, min, max, FakeQuantWithMinMaxVars::Attrs()) {} |
600 | |
601 | FakeQuantWithMinMaxVarsGradient::FakeQuantWithMinMaxVarsGradient(const |
602 | ::tensorflow::Scope& |
603 | scope, |
604 | ::tensorflow::Input |
605 | gradients, |
606 | ::tensorflow::Input |
607 | inputs, |
608 | ::tensorflow::Input |
609 | min, |
610 | ::tensorflow::Input |
611 | max, const |
612 | FakeQuantWithMinMaxVarsGradient::Attrs& |
613 | attrs) { |
614 | if (!scope.ok()) return; |
615 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
616 | if (!scope.ok()) return; |
617 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
618 | if (!scope.ok()) return; |
619 | auto _min = ::tensorflow::ops::AsNodeOut(scope, min); |
620 | if (!scope.ok()) return; |
621 | auto _max = ::tensorflow::ops::AsNodeOut(scope, max); |
622 | if (!scope.ok()) return; |
623 | ::tensorflow::Node* ret; |
624 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxVarsGradient" ); |
625 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxVarsGradient" ) |
626 | .Input(_gradients) |
627 | .Input(_inputs) |
628 | .Input(_min) |
629 | .Input(_max) |
630 | .Attr("num_bits" , attrs.num_bits_) |
631 | .Attr("narrow_range" , attrs.narrow_range_) |
632 | ; |
633 | scope.UpdateBuilder(&builder); |
634 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
635 | if (!scope.ok()) return; |
636 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
637 | this->operation = Operation(ret); |
638 | ::tensorflow::NameRangeMap _outputs_range; |
639 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
640 | if (!_status_.ok()) { |
641 | scope.UpdateStatus(_status_); |
642 | return; |
643 | } |
644 | |
645 | this->backprops_wrt_input = Output(ret, _outputs_range["backprops_wrt_input" ].first); |
646 | this->backprop_wrt_min = Output(ret, _outputs_range["backprop_wrt_min" ].first); |
647 | this->backprop_wrt_max = Output(ret, _outputs_range["backprop_wrt_max" ].first); |
648 | } |
649 | |
650 | FakeQuantWithMinMaxVarsGradient::FakeQuantWithMinMaxVarsGradient(const |
651 | ::tensorflow::Scope& |
652 | scope, |
653 | ::tensorflow::Input |
654 | gradients, |
655 | ::tensorflow::Input |
656 | inputs, |
657 | ::tensorflow::Input |
658 | min, |
659 | ::tensorflow::Input |
660 | max) |
661 | : FakeQuantWithMinMaxVarsGradient(scope, gradients, inputs, min, max, FakeQuantWithMinMaxVarsGradient::Attrs()) {} |
662 | |
663 | FakeQuantWithMinMaxVarsPerChannel::FakeQuantWithMinMaxVarsPerChannel(const |
664 | ::tensorflow::Scope& |
665 | scope, |
666 | ::tensorflow::Input |
667 | inputs, |
668 | ::tensorflow::Input |
669 | min, |
670 | ::tensorflow::Input |
671 | max, const |
672 | FakeQuantWithMinMaxVarsPerChannel::Attrs& |
673 | attrs) { |
674 | if (!scope.ok()) return; |
675 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
676 | if (!scope.ok()) return; |
677 | auto _min = ::tensorflow::ops::AsNodeOut(scope, min); |
678 | if (!scope.ok()) return; |
679 | auto _max = ::tensorflow::ops::AsNodeOut(scope, max); |
680 | if (!scope.ok()) return; |
681 | ::tensorflow::Node* ret; |
682 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxVarsPerChannel" ); |
683 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxVarsPerChannel" ) |
684 | .Input(_inputs) |
685 | .Input(_min) |
686 | .Input(_max) |
687 | .Attr("num_bits" , attrs.num_bits_) |
688 | .Attr("narrow_range" , attrs.narrow_range_) |
689 | ; |
690 | scope.UpdateBuilder(&builder); |
691 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
692 | if (!scope.ok()) return; |
693 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
694 | this->operation = Operation(ret); |
695 | this->outputs = Output(ret, 0); |
696 | } |
697 | |
698 | FakeQuantWithMinMaxVarsPerChannel::FakeQuantWithMinMaxVarsPerChannel(const |
699 | ::tensorflow::Scope& |
700 | scope, |
701 | ::tensorflow::Input |
702 | inputs, |
703 | ::tensorflow::Input |
704 | min, |
705 | ::tensorflow::Input |
706 | max) |
707 | : FakeQuantWithMinMaxVarsPerChannel(scope, inputs, min, max, FakeQuantWithMinMaxVarsPerChannel::Attrs()) {} |
708 | |
709 | FakeQuantWithMinMaxVarsPerChannelGradient::FakeQuantWithMinMaxVarsPerChannelGradient(const ::tensorflow::Scope& scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannelGradient::Attrs& |
710 | attrs) { |
711 | if (!scope.ok()) return; |
712 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
713 | if (!scope.ok()) return; |
714 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
715 | if (!scope.ok()) return; |
716 | auto _min = ::tensorflow::ops::AsNodeOut(scope, min); |
717 | if (!scope.ok()) return; |
718 | auto _max = ::tensorflow::ops::AsNodeOut(scope, max); |
719 | if (!scope.ok()) return; |
720 | ::tensorflow::Node* ret; |
721 | const auto unique_name = scope.GetUniqueNameForOp("FakeQuantWithMinMaxVarsPerChannelGradient" ); |
722 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FakeQuantWithMinMaxVarsPerChannelGradient" ) |
723 | .Input(_gradients) |
724 | .Input(_inputs) |
725 | .Input(_min) |
726 | .Input(_max) |
727 | .Attr("num_bits" , attrs.num_bits_) |
728 | .Attr("narrow_range" , attrs.narrow_range_) |
729 | ; |
730 | scope.UpdateBuilder(&builder); |
731 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
732 | if (!scope.ok()) return; |
733 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
734 | this->operation = Operation(ret); |
735 | ::tensorflow::NameRangeMap _outputs_range; |
736 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
737 | if (!_status_.ok()) { |
738 | scope.UpdateStatus(_status_); |
739 | return; |
740 | } |
741 | |
742 | this->backprops_wrt_input = Output(ret, _outputs_range["backprops_wrt_input" ].first); |
743 | this->backprop_wrt_min = Output(ret, _outputs_range["backprop_wrt_min" ].first); |
744 | this->backprop_wrt_max = Output(ret, _outputs_range["backprop_wrt_max" ].first); |
745 | } |
746 | |
747 | FakeQuantWithMinMaxVarsPerChannelGradient::FakeQuantWithMinMaxVarsPerChannelGradient(const ::tensorflow::Scope& scope, ::tensorflow::Input gradients, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input |
748 | max) |
749 | : FakeQuantWithMinMaxVarsPerChannelGradient(scope, gradients, inputs, min, max, FakeQuantWithMinMaxVarsPerChannelGradient::Attrs()) {} |
750 | |
751 | Fill::Fill(const ::tensorflow::Scope& scope, ::tensorflow::Input dims, |
752 | ::tensorflow::Input value) { |
753 | if (!scope.ok()) return; |
754 | auto _dims = ::tensorflow::ops::AsNodeOut(scope, dims); |
755 | if (!scope.ok()) return; |
756 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
757 | if (!scope.ok()) return; |
758 | ::tensorflow::Node* ret; |
759 | const auto unique_name = scope.GetUniqueNameForOp("Fill" ); |
760 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Fill" ) |
761 | .Input(_dims) |
762 | .Input(_value) |
763 | ; |
764 | scope.UpdateBuilder(&builder); |
765 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
766 | if (!scope.ok()) return; |
767 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
768 | this->operation = Operation(ret); |
769 | this->output = Output(ret, 0); |
770 | } |
771 | |
772 | Fingerprint::Fingerprint(const ::tensorflow::Scope& scope, ::tensorflow::Input |
773 | data, ::tensorflow::Input method) { |
774 | if (!scope.ok()) return; |
775 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
776 | if (!scope.ok()) return; |
777 | auto _method = ::tensorflow::ops::AsNodeOut(scope, method); |
778 | if (!scope.ok()) return; |
779 | ::tensorflow::Node* ret; |
780 | const auto unique_name = scope.GetUniqueNameForOp("Fingerprint" ); |
781 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Fingerprint" ) |
782 | .Input(_data) |
783 | .Input(_method) |
784 | ; |
785 | scope.UpdateBuilder(&builder); |
786 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
787 | if (!scope.ok()) return; |
788 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
789 | this->operation = Operation(ret); |
790 | this->fingerprint = Output(ret, 0); |
791 | } |
792 | |
793 | Gather::Gather(const ::tensorflow::Scope& scope, ::tensorflow::Input params, |
794 | ::tensorflow::Input indices, const Gather::Attrs& attrs) { |
795 | if (!scope.ok()) return; |
796 | auto _params = ::tensorflow::ops::AsNodeOut(scope, params); |
797 | if (!scope.ok()) return; |
798 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
799 | if (!scope.ok()) return; |
800 | ::tensorflow::Node* ret; |
801 | const auto unique_name = scope.GetUniqueNameForOp("Gather" ); |
802 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Gather" ) |
803 | .Input(_params) |
804 | .Input(_indices) |
805 | .Attr("validate_indices" , attrs.validate_indices_) |
806 | ; |
807 | scope.UpdateBuilder(&builder); |
808 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
809 | if (!scope.ok()) return; |
810 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
811 | this->operation = Operation(ret); |
812 | this->output = Output(ret, 0); |
813 | } |
814 | |
815 | Gather::Gather(const ::tensorflow::Scope& scope, ::tensorflow::Input params, |
816 | ::tensorflow::Input indices) |
817 | : Gather(scope, params, indices, Gather::Attrs()) {} |
818 | |
819 | GatherNd::GatherNd(const ::tensorflow::Scope& scope, ::tensorflow::Input |
820 | params, ::tensorflow::Input indices) { |
821 | if (!scope.ok()) return; |
822 | auto _params = ::tensorflow::ops::AsNodeOut(scope, params); |
823 | if (!scope.ok()) return; |
824 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
825 | if (!scope.ok()) return; |
826 | ::tensorflow::Node* ret; |
827 | const auto unique_name = scope.GetUniqueNameForOp("GatherNd" ); |
828 | auto builder = ::tensorflow::NodeBuilder(unique_name, "GatherNd" ) |
829 | .Input(_params) |
830 | .Input(_indices) |
831 | ; |
832 | scope.UpdateBuilder(&builder); |
833 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
834 | if (!scope.ok()) return; |
835 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
836 | this->operation = Operation(ret); |
837 | this->output = Output(ret, 0); |
838 | } |
839 | |
840 | GatherV2::GatherV2(const ::tensorflow::Scope& scope, ::tensorflow::Input |
841 | params, ::tensorflow::Input indices, ::tensorflow::Input |
842 | axis, const GatherV2::Attrs& attrs) { |
843 | if (!scope.ok()) return; |
844 | auto _params = ::tensorflow::ops::AsNodeOut(scope, params); |
845 | if (!scope.ok()) return; |
846 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
847 | if (!scope.ok()) return; |
848 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
849 | if (!scope.ok()) return; |
850 | ::tensorflow::Node* ret; |
851 | const auto unique_name = scope.GetUniqueNameForOp("GatherV2" ); |
852 | auto builder = ::tensorflow::NodeBuilder(unique_name, "GatherV2" ) |
853 | .Input(_params) |
854 | .Input(_indices) |
855 | .Input(_axis) |
856 | .Attr("batch_dims" , attrs.batch_dims_) |
857 | ; |
858 | scope.UpdateBuilder(&builder); |
859 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
860 | if (!scope.ok()) return; |
861 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
862 | this->operation = Operation(ret); |
863 | this->output = Output(ret, 0); |
864 | } |
865 | |
866 | GatherV2::GatherV2(const ::tensorflow::Scope& scope, ::tensorflow::Input |
867 | params, ::tensorflow::Input indices, ::tensorflow::Input |
868 | axis) |
869 | : GatherV2(scope, params, indices, axis, GatherV2::Attrs()) {} |
870 | |
871 | GuaranteeConst::GuaranteeConst(const ::tensorflow::Scope& scope, |
872 | ::tensorflow::Input input) { |
873 | if (!scope.ok()) return; |
874 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
875 | if (!scope.ok()) return; |
876 | ::tensorflow::Node* ret; |
877 | const auto unique_name = scope.GetUniqueNameForOp("GuaranteeConst" ); |
878 | auto builder = ::tensorflow::NodeBuilder(unique_name, "GuaranteeConst" ) |
879 | .Input(_input) |
880 | ; |
881 | scope.UpdateBuilder(&builder); |
882 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
883 | if (!scope.ok()) return; |
884 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
885 | this->operation = Operation(ret); |
886 | this->output = Output(ret, 0); |
887 | } |
888 | |
889 | Identity::Identity(const ::tensorflow::Scope& scope, ::tensorflow::Input input) { |
890 | if (!scope.ok()) return; |
891 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
892 | if (!scope.ok()) return; |
893 | ::tensorflow::Node* ret; |
894 | const auto unique_name = scope.GetUniqueNameForOp("Identity" ); |
895 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Identity" ) |
896 | .Input(_input) |
897 | ; |
898 | scope.UpdateBuilder(&builder); |
899 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
900 | if (!scope.ok()) return; |
901 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
902 | this->operation = Operation(ret); |
903 | this->output = Output(ret, 0); |
904 | } |
905 | |
906 | IdentityN::IdentityN(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
907 | input) { |
908 | if (!scope.ok()) return; |
909 | auto _input = ::tensorflow::ops::AsNodeOutList(scope, input); |
910 | if (!scope.ok()) return; |
911 | ::tensorflow::Node* ret; |
912 | const auto unique_name = scope.GetUniqueNameForOp("IdentityN" ); |
913 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IdentityN" ) |
914 | .Input(_input) |
915 | ; |
916 | scope.UpdateBuilder(&builder); |
917 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
918 | if (!scope.ok()) return; |
919 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
920 | this->operation = Operation(ret); |
921 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
922 | this->output.push_back(Output(ret, i)); |
923 | } |
924 | |
925 | ImmutableConst::ImmutableConst(const ::tensorflow::Scope& scope, DataType |
926 | dtype, PartialTensorShape shape, StringPiece |
927 | memory_region_name) { |
928 | if (!scope.ok()) return; |
929 | ::tensorflow::Node* ret; |
930 | const auto unique_name = scope.GetUniqueNameForOp("ImmutableConst" ); |
931 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ImmutableConst" ) |
932 | .Attr("dtype" , dtype) |
933 | .Attr("shape" , shape) |
934 | .Attr("memory_region_name" , memory_region_name) |
935 | ; |
936 | scope.UpdateBuilder(&builder); |
937 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
938 | if (!scope.ok()) return; |
939 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
940 | this->operation = Operation(ret); |
941 | this->tensor = Output(ret, 0); |
942 | } |
943 | |
944 | InplaceAdd::InplaceAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
945 | ::tensorflow::Input i, ::tensorflow::Input v) { |
946 | if (!scope.ok()) return; |
947 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
948 | if (!scope.ok()) return; |
949 | auto _i = ::tensorflow::ops::AsNodeOut(scope, i); |
950 | if (!scope.ok()) return; |
951 | auto _v = ::tensorflow::ops::AsNodeOut(scope, v); |
952 | if (!scope.ok()) return; |
953 | ::tensorflow::Node* ret; |
954 | const auto unique_name = scope.GetUniqueNameForOp("InplaceAdd" ); |
955 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InplaceAdd" ) |
956 | .Input(_x) |
957 | .Input(_i) |
958 | .Input(_v) |
959 | ; |
960 | scope.UpdateBuilder(&builder); |
961 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
962 | if (!scope.ok()) return; |
963 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
964 | this->operation = Operation(ret); |
965 | this->y = Output(ret, 0); |
966 | } |
967 | |
968 | InplaceSub::InplaceSub(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
969 | ::tensorflow::Input i, ::tensorflow::Input v) { |
970 | if (!scope.ok()) return; |
971 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
972 | if (!scope.ok()) return; |
973 | auto _i = ::tensorflow::ops::AsNodeOut(scope, i); |
974 | if (!scope.ok()) return; |
975 | auto _v = ::tensorflow::ops::AsNodeOut(scope, v); |
976 | if (!scope.ok()) return; |
977 | ::tensorflow::Node* ret; |
978 | const auto unique_name = scope.GetUniqueNameForOp("InplaceSub" ); |
979 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InplaceSub" ) |
980 | .Input(_x) |
981 | .Input(_i) |
982 | .Input(_v) |
983 | ; |
984 | scope.UpdateBuilder(&builder); |
985 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
986 | if (!scope.ok()) return; |
987 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
988 | this->operation = Operation(ret); |
989 | this->y = Output(ret, 0); |
990 | } |
991 | |
992 | InplaceUpdate::InplaceUpdate(const ::tensorflow::Scope& scope, |
993 | ::tensorflow::Input x, ::tensorflow::Input i, |
994 | ::tensorflow::Input v) { |
995 | if (!scope.ok()) return; |
996 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
997 | if (!scope.ok()) return; |
998 | auto _i = ::tensorflow::ops::AsNodeOut(scope, i); |
999 | if (!scope.ok()) return; |
1000 | auto _v = ::tensorflow::ops::AsNodeOut(scope, v); |
1001 | if (!scope.ok()) return; |
1002 | ::tensorflow::Node* ret; |
1003 | const auto unique_name = scope.GetUniqueNameForOp("InplaceUpdate" ); |
1004 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InplaceUpdate" ) |
1005 | .Input(_x) |
1006 | .Input(_i) |
1007 | .Input(_v) |
1008 | ; |
1009 | scope.UpdateBuilder(&builder); |
1010 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1011 | if (!scope.ok()) return; |
1012 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1013 | this->operation = Operation(ret); |
1014 | this->y = Output(ret, 0); |
1015 | } |
1016 | |
1017 | InvertPermutation::InvertPermutation(const ::tensorflow::Scope& scope, |
1018 | ::tensorflow::Input x) { |
1019 | if (!scope.ok()) return; |
1020 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
1021 | if (!scope.ok()) return; |
1022 | ::tensorflow::Node* ret; |
1023 | const auto unique_name = scope.GetUniqueNameForOp("InvertPermutation" ); |
1024 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InvertPermutation" ) |
1025 | .Input(_x) |
1026 | ; |
1027 | scope.UpdateBuilder(&builder); |
1028 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1029 | if (!scope.ok()) return; |
1030 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1031 | this->operation = Operation(ret); |
1032 | this->y = Output(ret, 0); |
1033 | } |
1034 | |
1035 | SetDiff1D::SetDiff1D(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
1036 | ::tensorflow::Input y, const SetDiff1D::Attrs& attrs) { |
1037 | if (!scope.ok()) return; |
1038 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
1039 | if (!scope.ok()) return; |
1040 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
1041 | if (!scope.ok()) return; |
1042 | ::tensorflow::Node* ret; |
1043 | const auto unique_name = scope.GetUniqueNameForOp("SetDiff1D" ); |
1044 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ListDiff" ) |
1045 | .Input(_x) |
1046 | .Input(_y) |
1047 | .Attr("out_idx" , attrs.out_idx_) |
1048 | ; |
1049 | scope.UpdateBuilder(&builder); |
1050 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1051 | if (!scope.ok()) return; |
1052 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1053 | this->operation = Operation(ret); |
1054 | ::tensorflow::NameRangeMap _outputs_range; |
1055 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1056 | if (!_status_.ok()) { |
1057 | scope.UpdateStatus(_status_); |
1058 | return; |
1059 | } |
1060 | |
1061 | this->out = Output(ret, _outputs_range["out" ].first); |
1062 | this->idx = Output(ret, _outputs_range["idx" ].first); |
1063 | } |
1064 | |
1065 | SetDiff1D::SetDiff1D(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
1066 | ::tensorflow::Input y) |
1067 | : SetDiff1D(scope, x, y, SetDiff1D::Attrs()) {} |
1068 | |
1069 | MatrixBandPart::MatrixBandPart(const ::tensorflow::Scope& scope, |
1070 | ::tensorflow::Input input, ::tensorflow::Input |
1071 | num_lower, ::tensorflow::Input num_upper) { |
1072 | if (!scope.ok()) return; |
1073 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1074 | if (!scope.ok()) return; |
1075 | auto _num_lower = ::tensorflow::ops::AsNodeOut(scope, num_lower); |
1076 | if (!scope.ok()) return; |
1077 | auto _num_upper = ::tensorflow::ops::AsNodeOut(scope, num_upper); |
1078 | if (!scope.ok()) return; |
1079 | ::tensorflow::Node* ret; |
1080 | const auto unique_name = scope.GetUniqueNameForOp("MatrixBandPart" ); |
1081 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixBandPart" ) |
1082 | .Input(_input) |
1083 | .Input(_num_lower) |
1084 | .Input(_num_upper) |
1085 | ; |
1086 | scope.UpdateBuilder(&builder); |
1087 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1088 | if (!scope.ok()) return; |
1089 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1090 | this->operation = Operation(ret); |
1091 | this->band = Output(ret, 0); |
1092 | } |
1093 | |
1094 | MatrixDiag::MatrixDiag(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1095 | diagonal) { |
1096 | if (!scope.ok()) return; |
1097 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1098 | if (!scope.ok()) return; |
1099 | ::tensorflow::Node* ret; |
1100 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiag" ); |
1101 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiag" ) |
1102 | .Input(_diagonal) |
1103 | ; |
1104 | scope.UpdateBuilder(&builder); |
1105 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1106 | if (!scope.ok()) return; |
1107 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1108 | this->operation = Operation(ret); |
1109 | this->output = Output(ret, 0); |
1110 | } |
1111 | |
1112 | MatrixDiagPart::MatrixDiagPart(const ::tensorflow::Scope& scope, |
1113 | ::tensorflow::Input input) { |
1114 | if (!scope.ok()) return; |
1115 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1116 | if (!scope.ok()) return; |
1117 | ::tensorflow::Node* ret; |
1118 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiagPart" ); |
1119 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiagPart" ) |
1120 | .Input(_input) |
1121 | ; |
1122 | scope.UpdateBuilder(&builder); |
1123 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1124 | if (!scope.ok()) return; |
1125 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1126 | this->operation = Operation(ret); |
1127 | this->diagonal = Output(ret, 0); |
1128 | } |
1129 | |
1130 | MatrixDiagPartV2::MatrixDiagPartV2(const ::tensorflow::Scope& scope, |
1131 | ::tensorflow::Input input, |
1132 | ::tensorflow::Input k, ::tensorflow::Input |
1133 | padding_value) { |
1134 | if (!scope.ok()) return; |
1135 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1136 | if (!scope.ok()) return; |
1137 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1138 | if (!scope.ok()) return; |
1139 | auto _padding_value = ::tensorflow::ops::AsNodeOut(scope, padding_value); |
1140 | if (!scope.ok()) return; |
1141 | ::tensorflow::Node* ret; |
1142 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiagPartV2" ); |
1143 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiagPartV2" ) |
1144 | .Input(_input) |
1145 | .Input(_k) |
1146 | .Input(_padding_value) |
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 | this->diagonal = Output(ret, 0); |
1154 | } |
1155 | |
1156 | MatrixDiagPartV3::MatrixDiagPartV3(const ::tensorflow::Scope& scope, |
1157 | ::tensorflow::Input input, |
1158 | ::tensorflow::Input k, ::tensorflow::Input |
1159 | padding_value, const |
1160 | MatrixDiagPartV3::Attrs& attrs) { |
1161 | if (!scope.ok()) return; |
1162 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1163 | if (!scope.ok()) return; |
1164 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1165 | if (!scope.ok()) return; |
1166 | auto _padding_value = ::tensorflow::ops::AsNodeOut(scope, padding_value); |
1167 | if (!scope.ok()) return; |
1168 | ::tensorflow::Node* ret; |
1169 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiagPartV3" ); |
1170 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiagPartV3" ) |
1171 | .Input(_input) |
1172 | .Input(_k) |
1173 | .Input(_padding_value) |
1174 | .Attr("align" , attrs.align_) |
1175 | ; |
1176 | scope.UpdateBuilder(&builder); |
1177 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1178 | if (!scope.ok()) return; |
1179 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1180 | this->operation = Operation(ret); |
1181 | this->diagonal = Output(ret, 0); |
1182 | } |
1183 | |
1184 | MatrixDiagPartV3::MatrixDiagPartV3(const ::tensorflow::Scope& scope, |
1185 | ::tensorflow::Input input, |
1186 | ::tensorflow::Input k, ::tensorflow::Input |
1187 | padding_value) |
1188 | : MatrixDiagPartV3(scope, input, k, padding_value, MatrixDiagPartV3::Attrs()) {} |
1189 | |
1190 | MatrixDiagV2::MatrixDiagV2(const ::tensorflow::Scope& scope, |
1191 | ::tensorflow::Input diagonal, ::tensorflow::Input k, |
1192 | ::tensorflow::Input num_rows, ::tensorflow::Input |
1193 | num_cols, ::tensorflow::Input padding_value) { |
1194 | if (!scope.ok()) return; |
1195 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1196 | if (!scope.ok()) return; |
1197 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1198 | if (!scope.ok()) return; |
1199 | auto _num_rows = ::tensorflow::ops::AsNodeOut(scope, num_rows); |
1200 | if (!scope.ok()) return; |
1201 | auto _num_cols = ::tensorflow::ops::AsNodeOut(scope, num_cols); |
1202 | if (!scope.ok()) return; |
1203 | auto _padding_value = ::tensorflow::ops::AsNodeOut(scope, padding_value); |
1204 | if (!scope.ok()) return; |
1205 | ::tensorflow::Node* ret; |
1206 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiagV2" ); |
1207 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiagV2" ) |
1208 | .Input(_diagonal) |
1209 | .Input(_k) |
1210 | .Input(_num_rows) |
1211 | .Input(_num_cols) |
1212 | .Input(_padding_value) |
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->output = Output(ret, 0); |
1220 | } |
1221 | |
1222 | MatrixDiagV3::MatrixDiagV3(const ::tensorflow::Scope& scope, |
1223 | ::tensorflow::Input diagonal, ::tensorflow::Input k, |
1224 | ::tensorflow::Input num_rows, ::tensorflow::Input |
1225 | num_cols, ::tensorflow::Input padding_value, const |
1226 | MatrixDiagV3::Attrs& attrs) { |
1227 | if (!scope.ok()) return; |
1228 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1229 | if (!scope.ok()) return; |
1230 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1231 | if (!scope.ok()) return; |
1232 | auto _num_rows = ::tensorflow::ops::AsNodeOut(scope, num_rows); |
1233 | if (!scope.ok()) return; |
1234 | auto _num_cols = ::tensorflow::ops::AsNodeOut(scope, num_cols); |
1235 | if (!scope.ok()) return; |
1236 | auto _padding_value = ::tensorflow::ops::AsNodeOut(scope, padding_value); |
1237 | if (!scope.ok()) return; |
1238 | ::tensorflow::Node* ret; |
1239 | const auto unique_name = scope.GetUniqueNameForOp("MatrixDiagV3" ); |
1240 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixDiagV3" ) |
1241 | .Input(_diagonal) |
1242 | .Input(_k) |
1243 | .Input(_num_rows) |
1244 | .Input(_num_cols) |
1245 | .Input(_padding_value) |
1246 | .Attr("align" , attrs.align_) |
1247 | ; |
1248 | scope.UpdateBuilder(&builder); |
1249 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1250 | if (!scope.ok()) return; |
1251 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1252 | this->operation = Operation(ret); |
1253 | this->output = Output(ret, 0); |
1254 | } |
1255 | |
1256 | MatrixDiagV3::MatrixDiagV3(const ::tensorflow::Scope& scope, |
1257 | ::tensorflow::Input diagonal, ::tensorflow::Input k, |
1258 | ::tensorflow::Input num_rows, ::tensorflow::Input |
1259 | num_cols, ::tensorflow::Input padding_value) |
1260 | : MatrixDiagV3(scope, diagonal, k, num_rows, num_cols, padding_value, MatrixDiagV3::Attrs()) {} |
1261 | |
1262 | MatrixSetDiag::MatrixSetDiag(const ::tensorflow::Scope& scope, |
1263 | ::tensorflow::Input input, ::tensorflow::Input |
1264 | diagonal) { |
1265 | if (!scope.ok()) return; |
1266 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1267 | if (!scope.ok()) return; |
1268 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1269 | if (!scope.ok()) return; |
1270 | ::tensorflow::Node* ret; |
1271 | const auto unique_name = scope.GetUniqueNameForOp("MatrixSetDiag" ); |
1272 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixSetDiag" ) |
1273 | .Input(_input) |
1274 | .Input(_diagonal) |
1275 | ; |
1276 | scope.UpdateBuilder(&builder); |
1277 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1278 | if (!scope.ok()) return; |
1279 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1280 | this->operation = Operation(ret); |
1281 | this->output = Output(ret, 0); |
1282 | } |
1283 | |
1284 | MatrixSetDiagV2::MatrixSetDiagV2(const ::tensorflow::Scope& scope, |
1285 | ::tensorflow::Input input, ::tensorflow::Input |
1286 | diagonal, ::tensorflow::Input k) { |
1287 | if (!scope.ok()) return; |
1288 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1289 | if (!scope.ok()) return; |
1290 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1291 | if (!scope.ok()) return; |
1292 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1293 | if (!scope.ok()) return; |
1294 | ::tensorflow::Node* ret; |
1295 | const auto unique_name = scope.GetUniqueNameForOp("MatrixSetDiagV2" ); |
1296 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixSetDiagV2" ) |
1297 | .Input(_input) |
1298 | .Input(_diagonal) |
1299 | .Input(_k) |
1300 | ; |
1301 | scope.UpdateBuilder(&builder); |
1302 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1303 | if (!scope.ok()) return; |
1304 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1305 | this->operation = Operation(ret); |
1306 | this->output = Output(ret, 0); |
1307 | } |
1308 | |
1309 | MatrixSetDiagV3::MatrixSetDiagV3(const ::tensorflow::Scope& scope, |
1310 | ::tensorflow::Input input, ::tensorflow::Input |
1311 | diagonal, ::tensorflow::Input k, const |
1312 | MatrixSetDiagV3::Attrs& attrs) { |
1313 | if (!scope.ok()) return; |
1314 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1315 | if (!scope.ok()) return; |
1316 | auto _diagonal = ::tensorflow::ops::AsNodeOut(scope, diagonal); |
1317 | if (!scope.ok()) return; |
1318 | auto _k = ::tensorflow::ops::AsNodeOut(scope, k); |
1319 | if (!scope.ok()) return; |
1320 | ::tensorflow::Node* ret; |
1321 | const auto unique_name = scope.GetUniqueNameForOp("MatrixSetDiagV3" ); |
1322 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MatrixSetDiagV3" ) |
1323 | .Input(_input) |
1324 | .Input(_diagonal) |
1325 | .Input(_k) |
1326 | .Attr("align" , attrs.align_) |
1327 | ; |
1328 | scope.UpdateBuilder(&builder); |
1329 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1330 | if (!scope.ok()) return; |
1331 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1332 | this->operation = Operation(ret); |
1333 | this->output = Output(ret, 0); |
1334 | } |
1335 | |
1336 | MatrixSetDiagV3::MatrixSetDiagV3(const ::tensorflow::Scope& scope, |
1337 | ::tensorflow::Input input, ::tensorflow::Input |
1338 | diagonal, ::tensorflow::Input k) |
1339 | : MatrixSetDiagV3(scope, input, diagonal, k, MatrixSetDiagV3::Attrs()) {} |
1340 | |
1341 | MirrorPad::MirrorPad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1342 | input, ::tensorflow::Input paddings, StringPiece mode) { |
1343 | if (!scope.ok()) return; |
1344 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1345 | if (!scope.ok()) return; |
1346 | auto _paddings = ::tensorflow::ops::AsNodeOut(scope, paddings); |
1347 | if (!scope.ok()) return; |
1348 | ::tensorflow::Node* ret; |
1349 | const auto unique_name = scope.GetUniqueNameForOp("MirrorPad" ); |
1350 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MirrorPad" ) |
1351 | .Input(_input) |
1352 | .Input(_paddings) |
1353 | .Attr("mode" , mode) |
1354 | ; |
1355 | scope.UpdateBuilder(&builder); |
1356 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1357 | if (!scope.ok()) return; |
1358 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1359 | this->operation = Operation(ret); |
1360 | this->output = Output(ret, 0); |
1361 | } |
1362 | |
1363 | OneHot::OneHot(const ::tensorflow::Scope& scope, ::tensorflow::Input indices, |
1364 | ::tensorflow::Input depth, ::tensorflow::Input on_value, |
1365 | ::tensorflow::Input off_value, const OneHot::Attrs& attrs) { |
1366 | if (!scope.ok()) return; |
1367 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
1368 | if (!scope.ok()) return; |
1369 | auto _depth = ::tensorflow::ops::AsNodeOut(scope, depth); |
1370 | if (!scope.ok()) return; |
1371 | auto _on_value = ::tensorflow::ops::AsNodeOut(scope, on_value); |
1372 | if (!scope.ok()) return; |
1373 | auto _off_value = ::tensorflow::ops::AsNodeOut(scope, off_value); |
1374 | if (!scope.ok()) return; |
1375 | ::tensorflow::Node* ret; |
1376 | const auto unique_name = scope.GetUniqueNameForOp("OneHot" ); |
1377 | auto builder = ::tensorflow::NodeBuilder(unique_name, "OneHot" ) |
1378 | .Input(_indices) |
1379 | .Input(_depth) |
1380 | .Input(_on_value) |
1381 | .Input(_off_value) |
1382 | .Attr("axis" , attrs.axis_) |
1383 | ; |
1384 | scope.UpdateBuilder(&builder); |
1385 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1386 | if (!scope.ok()) return; |
1387 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1388 | this->operation = Operation(ret); |
1389 | this->output = Output(ret, 0); |
1390 | } |
1391 | |
1392 | OneHot::OneHot(const ::tensorflow::Scope& scope, ::tensorflow::Input indices, |
1393 | ::tensorflow::Input depth, ::tensorflow::Input on_value, |
1394 | ::tensorflow::Input off_value) |
1395 | : OneHot(scope, indices, depth, on_value, off_value, OneHot::Attrs()) {} |
1396 | |
1397 | OnesLike::OnesLike(const ::tensorflow::Scope& scope, ::tensorflow::Input x) { |
1398 | if (!scope.ok()) return; |
1399 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
1400 | if (!scope.ok()) return; |
1401 | ::tensorflow::Node* ret; |
1402 | const auto unique_name = scope.GetUniqueNameForOp("OnesLike" ); |
1403 | auto builder = ::tensorflow::NodeBuilder(unique_name, "OnesLike" ) |
1404 | .Input(_x) |
1405 | ; |
1406 | scope.UpdateBuilder(&builder); |
1407 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1408 | if (!scope.ok()) return; |
1409 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1410 | this->operation = Operation(ret); |
1411 | this->y = Output(ret, 0); |
1412 | } |
1413 | |
1414 | Stack::Stack(const ::tensorflow::Scope& scope, ::tensorflow::InputList values, |
1415 | const Stack::Attrs& attrs) { |
1416 | if (!scope.ok()) return; |
1417 | auto _values = ::tensorflow::ops::AsNodeOutList(scope, values); |
1418 | if (!scope.ok()) return; |
1419 | ::tensorflow::Node* ret; |
1420 | const auto unique_name = scope.GetUniqueNameForOp("Stack" ); |
1421 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Pack" ) |
1422 | .Input(_values) |
1423 | .Attr("axis" , attrs.axis_) |
1424 | ; |
1425 | scope.UpdateBuilder(&builder); |
1426 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1427 | if (!scope.ok()) return; |
1428 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1429 | this->operation = Operation(ret); |
1430 | this->output = Output(ret, 0); |
1431 | } |
1432 | |
1433 | Stack::Stack(const ::tensorflow::Scope& scope, ::tensorflow::InputList values) |
1434 | : Stack(scope, values, Stack::Attrs()) {} |
1435 | |
1436 | Pad::Pad(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
1437 | ::tensorflow::Input paddings) { |
1438 | if (!scope.ok()) return; |
1439 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1440 | if (!scope.ok()) return; |
1441 | auto _paddings = ::tensorflow::ops::AsNodeOut(scope, paddings); |
1442 | if (!scope.ok()) return; |
1443 | ::tensorflow::Node* ret; |
1444 | const auto unique_name = scope.GetUniqueNameForOp("Pad" ); |
1445 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Pad" ) |
1446 | .Input(_input) |
1447 | .Input(_paddings) |
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->output = Output(ret, 0); |
1455 | } |
1456 | |
1457 | PadV2::PadV2(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
1458 | ::tensorflow::Input paddings, ::tensorflow::Input constant_values) { |
1459 | if (!scope.ok()) return; |
1460 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1461 | if (!scope.ok()) return; |
1462 | auto _paddings = ::tensorflow::ops::AsNodeOut(scope, paddings); |
1463 | if (!scope.ok()) return; |
1464 | auto _constant_values = ::tensorflow::ops::AsNodeOut(scope, constant_values); |
1465 | if (!scope.ok()) return; |
1466 | ::tensorflow::Node* ret; |
1467 | const auto unique_name = scope.GetUniqueNameForOp("PadV2" ); |
1468 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PadV2" ) |
1469 | .Input(_input) |
1470 | .Input(_paddings) |
1471 | .Input(_constant_values) |
1472 | ; |
1473 | scope.UpdateBuilder(&builder); |
1474 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1475 | if (!scope.ok()) return; |
1476 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1477 | this->operation = Operation(ret); |
1478 | this->output = Output(ret, 0); |
1479 | } |
1480 | |
1481 | ParallelConcat::ParallelConcat(const ::tensorflow::Scope& scope, |
1482 | ::tensorflow::InputList values, |
1483 | PartialTensorShape shape) { |
1484 | if (!scope.ok()) return; |
1485 | auto _values = ::tensorflow::ops::AsNodeOutList(scope, values); |
1486 | if (!scope.ok()) return; |
1487 | ::tensorflow::Node* ret; |
1488 | const auto unique_name = scope.GetUniqueNameForOp("ParallelConcat" ); |
1489 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ParallelConcat" ) |
1490 | .Input(_values) |
1491 | .Attr("shape" , shape) |
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->output = Output(ret, 0); |
1499 | } |
1500 | |
1501 | Placeholder::Placeholder(const ::tensorflow::Scope& scope, DataType dtype, |
1502 | const Placeholder::Attrs& attrs) { |
1503 | if (!scope.ok()) return; |
1504 | ::tensorflow::Node* ret; |
1505 | const auto unique_name = scope.GetUniqueNameForOp("Placeholder" ); |
1506 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Placeholder" ) |
1507 | .Attr("dtype" , dtype) |
1508 | .Attr("shape" , attrs.shape_) |
1509 | ; |
1510 | scope.UpdateBuilder(&builder); |
1511 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1512 | if (!scope.ok()) return; |
1513 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1514 | this->operation = Operation(ret); |
1515 | this->output = Output(ret, 0); |
1516 | } |
1517 | |
1518 | Placeholder::Placeholder(const ::tensorflow::Scope& scope, DataType dtype) |
1519 | : Placeholder(scope, dtype, Placeholder::Attrs()) {} |
1520 | |
1521 | PlaceholderWithDefault::PlaceholderWithDefault(const ::tensorflow::Scope& |
1522 | scope, ::tensorflow::Input |
1523 | input, PartialTensorShape shape) { |
1524 | if (!scope.ok()) return; |
1525 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1526 | if (!scope.ok()) return; |
1527 | ::tensorflow::Node* ret; |
1528 | const auto unique_name = scope.GetUniqueNameForOp("PlaceholderWithDefault" ); |
1529 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PlaceholderWithDefault" ) |
1530 | .Input(_input) |
1531 | .Attr("shape" , shape) |
1532 | ; |
1533 | scope.UpdateBuilder(&builder); |
1534 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1535 | if (!scope.ok()) return; |
1536 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1537 | this->operation = Operation(ret); |
1538 | this->output = Output(ret, 0); |
1539 | } |
1540 | |
1541 | PreventGradient::PreventGradient(const ::tensorflow::Scope& scope, |
1542 | ::tensorflow::Input input, const |
1543 | PreventGradient::Attrs& attrs) { |
1544 | if (!scope.ok()) return; |
1545 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1546 | if (!scope.ok()) return; |
1547 | ::tensorflow::Node* ret; |
1548 | const auto unique_name = scope.GetUniqueNameForOp("PreventGradient" ); |
1549 | auto builder = ::tensorflow::NodeBuilder(unique_name, "PreventGradient" ) |
1550 | .Input(_input) |
1551 | .Attr("message" , attrs.message_) |
1552 | ; |
1553 | scope.UpdateBuilder(&builder); |
1554 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1555 | if (!scope.ok()) return; |
1556 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1557 | this->operation = Operation(ret); |
1558 | this->output = Output(ret, 0); |
1559 | } |
1560 | |
1561 | PreventGradient::PreventGradient(const ::tensorflow::Scope& scope, |
1562 | ::tensorflow::Input input) |
1563 | : PreventGradient(scope, input, PreventGradient::Attrs()) {} |
1564 | |
1565 | QuantizeAndDequantizeV2::QuantizeAndDequantizeV2(const ::tensorflow::Scope& |
1566 | scope, ::tensorflow::Input |
1567 | input, ::tensorflow::Input |
1568 | input_min, ::tensorflow::Input |
1569 | input_max, const |
1570 | QuantizeAndDequantizeV2::Attrs& |
1571 | attrs) { |
1572 | if (!scope.ok()) return; |
1573 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1574 | if (!scope.ok()) return; |
1575 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
1576 | if (!scope.ok()) return; |
1577 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
1578 | if (!scope.ok()) return; |
1579 | ::tensorflow::Node* ret; |
1580 | const auto unique_name = scope.GetUniqueNameForOp("QuantizeAndDequantizeV2" ); |
1581 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizeAndDequantizeV2" ) |
1582 | .Input(_input) |
1583 | .Input(_input_min) |
1584 | .Input(_input_max) |
1585 | .Attr("signed_input" , attrs.signed_input_) |
1586 | .Attr("num_bits" , attrs.num_bits_) |
1587 | .Attr("range_given" , attrs.range_given_) |
1588 | .Attr("round_mode" , attrs.round_mode_) |
1589 | .Attr("narrow_range" , attrs.narrow_range_) |
1590 | .Attr("axis" , attrs.axis_) |
1591 | ; |
1592 | scope.UpdateBuilder(&builder); |
1593 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1594 | if (!scope.ok()) return; |
1595 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1596 | this->operation = Operation(ret); |
1597 | this->output = Output(ret, 0); |
1598 | } |
1599 | |
1600 | QuantizeAndDequantizeV2::QuantizeAndDequantizeV2(const ::tensorflow::Scope& |
1601 | scope, ::tensorflow::Input |
1602 | input, ::tensorflow::Input |
1603 | input_min, ::tensorflow::Input |
1604 | input_max) |
1605 | : QuantizeAndDequantizeV2(scope, input, input_min, input_max, QuantizeAndDequantizeV2::Attrs()) {} |
1606 | |
1607 | QuantizeAndDequantizeV3::QuantizeAndDequantizeV3(const ::tensorflow::Scope& |
1608 | scope, ::tensorflow::Input |
1609 | input, ::tensorflow::Input |
1610 | input_min, ::tensorflow::Input |
1611 | input_max, ::tensorflow::Input |
1612 | num_bits, const |
1613 | QuantizeAndDequantizeV3::Attrs& |
1614 | attrs) { |
1615 | if (!scope.ok()) return; |
1616 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1617 | if (!scope.ok()) return; |
1618 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
1619 | if (!scope.ok()) return; |
1620 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
1621 | if (!scope.ok()) return; |
1622 | auto _num_bits = ::tensorflow::ops::AsNodeOut(scope, num_bits); |
1623 | if (!scope.ok()) return; |
1624 | ::tensorflow::Node* ret; |
1625 | const auto unique_name = scope.GetUniqueNameForOp("QuantizeAndDequantizeV3" ); |
1626 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizeAndDequantizeV3" ) |
1627 | .Input(_input) |
1628 | .Input(_input_min) |
1629 | .Input(_input_max) |
1630 | .Input(_num_bits) |
1631 | .Attr("signed_input" , attrs.signed_input_) |
1632 | .Attr("range_given" , attrs.range_given_) |
1633 | .Attr("narrow_range" , attrs.narrow_range_) |
1634 | .Attr("axis" , attrs.axis_) |
1635 | ; |
1636 | scope.UpdateBuilder(&builder); |
1637 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1638 | if (!scope.ok()) return; |
1639 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1640 | this->operation = Operation(ret); |
1641 | this->output = Output(ret, 0); |
1642 | } |
1643 | |
1644 | QuantizeAndDequantizeV3::QuantizeAndDequantizeV3(const ::tensorflow::Scope& |
1645 | scope, ::tensorflow::Input |
1646 | input, ::tensorflow::Input |
1647 | input_min, ::tensorflow::Input |
1648 | input_max, ::tensorflow::Input |
1649 | num_bits) |
1650 | : QuantizeAndDequantizeV3(scope, input, input_min, input_max, num_bits, QuantizeAndDequantizeV3::Attrs()) {} |
1651 | |
1652 | QuantizeAndDequantizeV4::QuantizeAndDequantizeV4(const ::tensorflow::Scope& |
1653 | scope, ::tensorflow::Input |
1654 | input, ::tensorflow::Input |
1655 | input_min, ::tensorflow::Input |
1656 | input_max, const |
1657 | QuantizeAndDequantizeV4::Attrs& |
1658 | attrs) { |
1659 | if (!scope.ok()) return; |
1660 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1661 | if (!scope.ok()) return; |
1662 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
1663 | if (!scope.ok()) return; |
1664 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
1665 | if (!scope.ok()) return; |
1666 | ::tensorflow::Node* ret; |
1667 | const auto unique_name = scope.GetUniqueNameForOp("QuantizeAndDequantizeV4" ); |
1668 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizeAndDequantizeV4" ) |
1669 | .Input(_input) |
1670 | .Input(_input_min) |
1671 | .Input(_input_max) |
1672 | .Attr("signed_input" , attrs.signed_input_) |
1673 | .Attr("num_bits" , attrs.num_bits_) |
1674 | .Attr("range_given" , attrs.range_given_) |
1675 | .Attr("round_mode" , attrs.round_mode_) |
1676 | .Attr("narrow_range" , attrs.narrow_range_) |
1677 | .Attr("axis" , attrs.axis_) |
1678 | ; |
1679 | scope.UpdateBuilder(&builder); |
1680 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1681 | if (!scope.ok()) return; |
1682 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1683 | this->operation = Operation(ret); |
1684 | this->output = Output(ret, 0); |
1685 | } |
1686 | |
1687 | QuantizeAndDequantizeV4::QuantizeAndDequantizeV4(const ::tensorflow::Scope& |
1688 | scope, ::tensorflow::Input |
1689 | input, ::tensorflow::Input |
1690 | input_min, ::tensorflow::Input |
1691 | input_max) |
1692 | : QuantizeAndDequantizeV4(scope, input, input_min, input_max, QuantizeAndDequantizeV4::Attrs()) {} |
1693 | |
1694 | QuantizeAndDequantizeV4Grad::QuantizeAndDequantizeV4Grad(const |
1695 | ::tensorflow::Scope& |
1696 | scope, |
1697 | ::tensorflow::Input |
1698 | gradients, |
1699 | ::tensorflow::Input |
1700 | input, |
1701 | ::tensorflow::Input |
1702 | input_min, |
1703 | ::tensorflow::Input |
1704 | input_max, const |
1705 | QuantizeAndDequantizeV4Grad::Attrs& |
1706 | attrs) { |
1707 | if (!scope.ok()) return; |
1708 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
1709 | if (!scope.ok()) return; |
1710 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1711 | if (!scope.ok()) return; |
1712 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
1713 | if (!scope.ok()) return; |
1714 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
1715 | if (!scope.ok()) return; |
1716 | ::tensorflow::Node* ret; |
1717 | const auto unique_name = scope.GetUniqueNameForOp("QuantizeAndDequantizeV4Grad" ); |
1718 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizeAndDequantizeV4Grad" ) |
1719 | .Input(_gradients) |
1720 | .Input(_input) |
1721 | .Input(_input_min) |
1722 | .Input(_input_max) |
1723 | .Attr("axis" , attrs.axis_) |
1724 | ; |
1725 | scope.UpdateBuilder(&builder); |
1726 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1727 | if (!scope.ok()) return; |
1728 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1729 | this->operation = Operation(ret); |
1730 | ::tensorflow::NameRangeMap _outputs_range; |
1731 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1732 | if (!_status_.ok()) { |
1733 | scope.UpdateStatus(_status_); |
1734 | return; |
1735 | } |
1736 | |
1737 | this->input_backprop = Output(ret, _outputs_range["input_backprop" ].first); |
1738 | this->input_min_backprop = Output(ret, _outputs_range["input_min_backprop" ].first); |
1739 | this->input_max_backprop = Output(ret, _outputs_range["input_max_backprop" ].first); |
1740 | } |
1741 | |
1742 | QuantizeAndDequantizeV4Grad::QuantizeAndDequantizeV4Grad(const |
1743 | ::tensorflow::Scope& |
1744 | scope, |
1745 | ::tensorflow::Input |
1746 | gradients, |
1747 | ::tensorflow::Input |
1748 | input, |
1749 | ::tensorflow::Input |
1750 | input_min, |
1751 | ::tensorflow::Input |
1752 | input_max) |
1753 | : QuantizeAndDequantizeV4Grad(scope, gradients, input, input_min, input_max, QuantizeAndDequantizeV4Grad::Attrs()) {} |
1754 | |
1755 | QuantizeV2::QuantizeV2(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1756 | input, ::tensorflow::Input min_range, |
1757 | ::tensorflow::Input max_range, DataType T, const |
1758 | QuantizeV2::Attrs& attrs) { |
1759 | if (!scope.ok()) return; |
1760 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1761 | if (!scope.ok()) return; |
1762 | auto _min_range = ::tensorflow::ops::AsNodeOut(scope, min_range); |
1763 | if (!scope.ok()) return; |
1764 | auto _max_range = ::tensorflow::ops::AsNodeOut(scope, max_range); |
1765 | if (!scope.ok()) return; |
1766 | ::tensorflow::Node* ret; |
1767 | const auto unique_name = scope.GetUniqueNameForOp("QuantizeV2" ); |
1768 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizeV2" ) |
1769 | .Input(_input) |
1770 | .Input(_min_range) |
1771 | .Input(_max_range) |
1772 | .Attr("T" , T) |
1773 | .Attr("mode" , attrs.mode_) |
1774 | .Attr("round_mode" , attrs.round_mode_) |
1775 | .Attr("narrow_range" , attrs.narrow_range_) |
1776 | .Attr("axis" , attrs.axis_) |
1777 | .Attr("ensure_minimum_range" , attrs.ensure_minimum_range_) |
1778 | ; |
1779 | scope.UpdateBuilder(&builder); |
1780 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1781 | if (!scope.ok()) return; |
1782 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1783 | this->operation = Operation(ret); |
1784 | ::tensorflow::NameRangeMap _outputs_range; |
1785 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1786 | if (!_status_.ok()) { |
1787 | scope.UpdateStatus(_status_); |
1788 | return; |
1789 | } |
1790 | |
1791 | this->output = Output(ret, _outputs_range["output" ].first); |
1792 | this->output_min = Output(ret, _outputs_range["output_min" ].first); |
1793 | this->output_max = Output(ret, _outputs_range["output_max" ].first); |
1794 | } |
1795 | |
1796 | QuantizeV2::QuantizeV2(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1797 | input, ::tensorflow::Input min_range, |
1798 | ::tensorflow::Input max_range, DataType T) |
1799 | : QuantizeV2(scope, input, min_range, max_range, T, QuantizeV2::Attrs()) {} |
1800 | |
1801 | QuantizedConcat::QuantizedConcat(const ::tensorflow::Scope& scope, |
1802 | ::tensorflow::Input concat_dim, |
1803 | ::tensorflow::InputList values, |
1804 | ::tensorflow::InputList input_mins, |
1805 | ::tensorflow::InputList input_maxes) { |
1806 | if (!scope.ok()) return; |
1807 | auto _concat_dim = ::tensorflow::ops::AsNodeOut(scope, concat_dim); |
1808 | if (!scope.ok()) return; |
1809 | auto _values = ::tensorflow::ops::AsNodeOutList(scope, values); |
1810 | if (!scope.ok()) return; |
1811 | auto _input_mins = ::tensorflow::ops::AsNodeOutList(scope, input_mins); |
1812 | if (!scope.ok()) return; |
1813 | auto _input_maxes = ::tensorflow::ops::AsNodeOutList(scope, input_maxes); |
1814 | if (!scope.ok()) return; |
1815 | ::tensorflow::Node* ret; |
1816 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConcat" ); |
1817 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConcat" ) |
1818 | .Input(_concat_dim) |
1819 | .Input(_values) |
1820 | .Input(_input_mins) |
1821 | .Input(_input_maxes) |
1822 | ; |
1823 | scope.UpdateBuilder(&builder); |
1824 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1825 | if (!scope.ok()) return; |
1826 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1827 | this->operation = Operation(ret); |
1828 | ::tensorflow::NameRangeMap _outputs_range; |
1829 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1830 | if (!_status_.ok()) { |
1831 | scope.UpdateStatus(_status_); |
1832 | return; |
1833 | } |
1834 | |
1835 | this->output = Output(ret, _outputs_range["output" ].first); |
1836 | this->output_min = Output(ret, _outputs_range["output_min" ].first); |
1837 | this->output_max = Output(ret, _outputs_range["output_max" ].first); |
1838 | } |
1839 | |
1840 | QuantizedInstanceNorm::QuantizedInstanceNorm(const ::tensorflow::Scope& scope, |
1841 | ::tensorflow::Input x, |
1842 | ::tensorflow::Input x_min, |
1843 | ::tensorflow::Input x_max, const |
1844 | QuantizedInstanceNorm::Attrs& |
1845 | attrs) { |
1846 | if (!scope.ok()) return; |
1847 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
1848 | if (!scope.ok()) return; |
1849 | auto _x_min = ::tensorflow::ops::AsNodeOut(scope, x_min); |
1850 | if (!scope.ok()) return; |
1851 | auto _x_max = ::tensorflow::ops::AsNodeOut(scope, x_max); |
1852 | if (!scope.ok()) return; |
1853 | ::tensorflow::Node* ret; |
1854 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedInstanceNorm" ); |
1855 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedInstanceNorm" ) |
1856 | .Input(_x) |
1857 | .Input(_x_min) |
1858 | .Input(_x_max) |
1859 | .Attr("output_range_given" , attrs.output_range_given_) |
1860 | .Attr("given_y_min" , attrs.given_y_min_) |
1861 | .Attr("given_y_max" , attrs.given_y_max_) |
1862 | .Attr("variance_epsilon" , attrs.variance_epsilon_) |
1863 | .Attr("min_separation" , attrs.min_separation_) |
1864 | ; |
1865 | scope.UpdateBuilder(&builder); |
1866 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1867 | if (!scope.ok()) return; |
1868 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1869 | this->operation = Operation(ret); |
1870 | ::tensorflow::NameRangeMap _outputs_range; |
1871 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1872 | if (!_status_.ok()) { |
1873 | scope.UpdateStatus(_status_); |
1874 | return; |
1875 | } |
1876 | |
1877 | this->y = Output(ret, _outputs_range["y" ].first); |
1878 | this->y_min = Output(ret, _outputs_range["y_min" ].first); |
1879 | this->y_max = Output(ret, _outputs_range["y_max" ].first); |
1880 | } |
1881 | |
1882 | QuantizedInstanceNorm::QuantizedInstanceNorm(const ::tensorflow::Scope& scope, |
1883 | ::tensorflow::Input x, |
1884 | ::tensorflow::Input x_min, |
1885 | ::tensorflow::Input x_max) |
1886 | : QuantizedInstanceNorm(scope, x, x_min, x_max, QuantizedInstanceNorm::Attrs()) {} |
1887 | |
1888 | QuantizedReshape::QuantizedReshape(const ::tensorflow::Scope& scope, |
1889 | ::tensorflow::Input tensor, |
1890 | ::tensorflow::Input shape, |
1891 | ::tensorflow::Input input_min, |
1892 | ::tensorflow::Input input_max) { |
1893 | if (!scope.ok()) return; |
1894 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
1895 | if (!scope.ok()) return; |
1896 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
1897 | if (!scope.ok()) return; |
1898 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
1899 | if (!scope.ok()) return; |
1900 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
1901 | if (!scope.ok()) return; |
1902 | ::tensorflow::Node* ret; |
1903 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedReshape" ); |
1904 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedReshape" ) |
1905 | .Input(_tensor) |
1906 | .Input(_shape) |
1907 | .Input(_input_min) |
1908 | .Input(_input_max) |
1909 | ; |
1910 | scope.UpdateBuilder(&builder); |
1911 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1912 | if (!scope.ok()) return; |
1913 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1914 | this->operation = Operation(ret); |
1915 | ::tensorflow::NameRangeMap _outputs_range; |
1916 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1917 | if (!_status_.ok()) { |
1918 | scope.UpdateStatus(_status_); |
1919 | return; |
1920 | } |
1921 | |
1922 | this->output = Output(ret, _outputs_range["output" ].first); |
1923 | this->output_min = Output(ret, _outputs_range["output_min" ].first); |
1924 | this->output_max = Output(ret, _outputs_range["output_max" ].first); |
1925 | } |
1926 | |
1927 | Rank::Rank(const ::tensorflow::Scope& scope, ::tensorflow::Input input) { |
1928 | if (!scope.ok()) return; |
1929 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1930 | if (!scope.ok()) return; |
1931 | ::tensorflow::Node* ret; |
1932 | const auto unique_name = scope.GetUniqueNameForOp("Rank" ); |
1933 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Rank" ) |
1934 | .Input(_input) |
1935 | ; |
1936 | scope.UpdateBuilder(&builder); |
1937 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1938 | if (!scope.ok()) return; |
1939 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1940 | this->operation = Operation(ret); |
1941 | this->output = Output(ret, 0); |
1942 | } |
1943 | |
1944 | Reshape::Reshape(const ::tensorflow::Scope& scope, ::tensorflow::Input tensor, |
1945 | ::tensorflow::Input shape) { |
1946 | if (!scope.ok()) return; |
1947 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
1948 | if (!scope.ok()) return; |
1949 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
1950 | if (!scope.ok()) return; |
1951 | ::tensorflow::Node* ret; |
1952 | const auto unique_name = scope.GetUniqueNameForOp("Reshape" ); |
1953 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Reshape" ) |
1954 | .Input(_tensor) |
1955 | .Input(_shape) |
1956 | ; |
1957 | scope.UpdateBuilder(&builder); |
1958 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1959 | if (!scope.ok()) return; |
1960 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1961 | this->operation = Operation(ret); |
1962 | this->output = Output(ret, 0); |
1963 | } |
1964 | |
1965 | ResourceStridedSliceAssign::ResourceStridedSliceAssign(const |
1966 | ::tensorflow::Scope& |
1967 | scope, |
1968 | ::tensorflow::Input ref, |
1969 | ::tensorflow::Input |
1970 | begin, |
1971 | ::tensorflow::Input end, |
1972 | ::tensorflow::Input |
1973 | strides, |
1974 | ::tensorflow::Input |
1975 | value, const |
1976 | ResourceStridedSliceAssign::Attrs& |
1977 | attrs) { |
1978 | if (!scope.ok()) return; |
1979 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
1980 | if (!scope.ok()) return; |
1981 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
1982 | if (!scope.ok()) return; |
1983 | auto _end = ::tensorflow::ops::AsNodeOut(scope, end); |
1984 | if (!scope.ok()) return; |
1985 | auto _strides = ::tensorflow::ops::AsNodeOut(scope, strides); |
1986 | if (!scope.ok()) return; |
1987 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
1988 | if (!scope.ok()) return; |
1989 | ::tensorflow::Node* ret; |
1990 | const auto unique_name = scope.GetUniqueNameForOp("ResourceStridedSliceAssign" ); |
1991 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ResourceStridedSliceAssign" ) |
1992 | .Input(_ref) |
1993 | .Input(_begin) |
1994 | .Input(_end) |
1995 | .Input(_strides) |
1996 | .Input(_value) |
1997 | .Attr("begin_mask" , attrs.begin_mask_) |
1998 | .Attr("end_mask" , attrs.end_mask_) |
1999 | .Attr("ellipsis_mask" , attrs.ellipsis_mask_) |
2000 | .Attr("new_axis_mask" , attrs.new_axis_mask_) |
2001 | .Attr("shrink_axis_mask" , attrs.shrink_axis_mask_) |
2002 | ; |
2003 | scope.UpdateBuilder(&builder); |
2004 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2005 | if (!scope.ok()) return; |
2006 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2007 | this->operation = Operation(ret); |
2008 | return; |
2009 | } |
2010 | |
2011 | ResourceStridedSliceAssign::ResourceStridedSliceAssign(const |
2012 | ::tensorflow::Scope& |
2013 | scope, |
2014 | ::tensorflow::Input ref, |
2015 | ::tensorflow::Input |
2016 | begin, |
2017 | ::tensorflow::Input end, |
2018 | ::tensorflow::Input |
2019 | strides, |
2020 | ::tensorflow::Input |
2021 | value) |
2022 | : ResourceStridedSliceAssign(scope, ref, begin, end, strides, value, ResourceStridedSliceAssign::Attrs()) {} |
2023 | |
2024 | ReverseSequence::ReverseSequence(const ::tensorflow::Scope& scope, |
2025 | ::tensorflow::Input input, ::tensorflow::Input |
2026 | seq_lengths, int64 seq_dim, const |
2027 | ReverseSequence::Attrs& attrs) { |
2028 | if (!scope.ok()) return; |
2029 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2030 | if (!scope.ok()) return; |
2031 | auto _seq_lengths = ::tensorflow::ops::AsNodeOut(scope, seq_lengths); |
2032 | if (!scope.ok()) return; |
2033 | ::tensorflow::Node* ret; |
2034 | const auto unique_name = scope.GetUniqueNameForOp("ReverseSequence" ); |
2035 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReverseSequence" ) |
2036 | .Input(_input) |
2037 | .Input(_seq_lengths) |
2038 | .Attr("seq_dim" , seq_dim) |
2039 | .Attr("batch_dim" , attrs.batch_dim_) |
2040 | ; |
2041 | scope.UpdateBuilder(&builder); |
2042 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2043 | if (!scope.ok()) return; |
2044 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2045 | this->operation = Operation(ret); |
2046 | this->output = Output(ret, 0); |
2047 | } |
2048 | |
2049 | ReverseSequence::ReverseSequence(const ::tensorflow::Scope& scope, |
2050 | ::tensorflow::Input input, ::tensorflow::Input |
2051 | seq_lengths, int64 seq_dim) |
2052 | : ReverseSequence(scope, input, seq_lengths, seq_dim, ReverseSequence::Attrs()) {} |
2053 | |
2054 | Reverse::Reverse(const ::tensorflow::Scope& scope, ::tensorflow::Input tensor, |
2055 | ::tensorflow::Input axis) { |
2056 | if (!scope.ok()) return; |
2057 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2058 | if (!scope.ok()) return; |
2059 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
2060 | if (!scope.ok()) return; |
2061 | ::tensorflow::Node* ret; |
2062 | const auto unique_name = scope.GetUniqueNameForOp("Reverse" ); |
2063 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReverseV2" ) |
2064 | .Input(_tensor) |
2065 | .Input(_axis) |
2066 | ; |
2067 | scope.UpdateBuilder(&builder); |
2068 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2069 | if (!scope.ok()) return; |
2070 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2071 | this->operation = Operation(ret); |
2072 | this->output = Output(ret, 0); |
2073 | } |
2074 | |
2075 | ScatterNd::ScatterNd(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2076 | indices, ::tensorflow::Input updates, ::tensorflow::Input |
2077 | shape) { |
2078 | if (!scope.ok()) return; |
2079 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2080 | if (!scope.ok()) return; |
2081 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2082 | if (!scope.ok()) return; |
2083 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
2084 | if (!scope.ok()) return; |
2085 | ::tensorflow::Node* ret; |
2086 | const auto unique_name = scope.GetUniqueNameForOp("ScatterNd" ); |
2087 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterNd" ) |
2088 | .Input(_indices) |
2089 | .Input(_updates) |
2090 | .Input(_shape) |
2091 | ; |
2092 | scope.UpdateBuilder(&builder); |
2093 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2094 | if (!scope.ok()) return; |
2095 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2096 | this->operation = Operation(ret); |
2097 | this->output = Output(ret, 0); |
2098 | } |
2099 | |
2100 | ScatterNdNonAliasingAdd::ScatterNdNonAliasingAdd(const ::tensorflow::Scope& |
2101 | scope, ::tensorflow::Input |
2102 | input, ::tensorflow::Input |
2103 | indices, ::tensorflow::Input |
2104 | updates) { |
2105 | if (!scope.ok()) return; |
2106 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2107 | if (!scope.ok()) return; |
2108 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2109 | if (!scope.ok()) return; |
2110 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2111 | if (!scope.ok()) return; |
2112 | ::tensorflow::Node* ret; |
2113 | const auto unique_name = scope.GetUniqueNameForOp("ScatterNdNonAliasingAdd" ); |
2114 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ScatterNdNonAliasingAdd" ) |
2115 | .Input(_input) |
2116 | .Input(_indices) |
2117 | .Input(_updates) |
2118 | ; |
2119 | scope.UpdateBuilder(&builder); |
2120 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2121 | if (!scope.ok()) return; |
2122 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2123 | this->operation = Operation(ret); |
2124 | this->output = Output(ret, 0); |
2125 | } |
2126 | |
2127 | Shape::Shape(const ::tensorflow::Scope& scope, ::tensorflow::Input input, const |
2128 | Shape::Attrs& attrs) { |
2129 | if (!scope.ok()) return; |
2130 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2131 | if (!scope.ok()) return; |
2132 | ::tensorflow::Node* ret; |
2133 | const auto unique_name = scope.GetUniqueNameForOp("Shape" ); |
2134 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Shape" ) |
2135 | .Input(_input) |
2136 | .Attr("out_type" , attrs.out_type_) |
2137 | ; |
2138 | scope.UpdateBuilder(&builder); |
2139 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2140 | if (!scope.ok()) return; |
2141 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2142 | this->operation = Operation(ret); |
2143 | this->output = Output(ret, 0); |
2144 | } |
2145 | |
2146 | Shape::Shape(const ::tensorflow::Scope& scope, ::tensorflow::Input input) |
2147 | : Shape(scope, input, Shape::Attrs()) {} |
2148 | |
2149 | ShapeN::ShapeN(const ::tensorflow::Scope& scope, ::tensorflow::InputList input, |
2150 | const ShapeN::Attrs& attrs) { |
2151 | if (!scope.ok()) return; |
2152 | auto _input = ::tensorflow::ops::AsNodeOutList(scope, input); |
2153 | if (!scope.ok()) return; |
2154 | ::tensorflow::Node* ret; |
2155 | const auto unique_name = scope.GetUniqueNameForOp("ShapeN" ); |
2156 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ShapeN" ) |
2157 | .Input(_input) |
2158 | .Attr("out_type" , attrs.out_type_) |
2159 | ; |
2160 | scope.UpdateBuilder(&builder); |
2161 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2162 | if (!scope.ok()) return; |
2163 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2164 | this->operation = Operation(ret); |
2165 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
2166 | this->output.push_back(Output(ret, i)); |
2167 | } |
2168 | |
2169 | ShapeN::ShapeN(const ::tensorflow::Scope& scope, ::tensorflow::InputList input) |
2170 | : ShapeN(scope, input, ShapeN::Attrs()) {} |
2171 | |
2172 | Size::Size(const ::tensorflow::Scope& scope, ::tensorflow::Input input, const |
2173 | Size::Attrs& attrs) { |
2174 | if (!scope.ok()) return; |
2175 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2176 | if (!scope.ok()) return; |
2177 | ::tensorflow::Node* ret; |
2178 | const auto unique_name = scope.GetUniqueNameForOp("Size" ); |
2179 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Size" ) |
2180 | .Input(_input) |
2181 | .Attr("out_type" , attrs.out_type_) |
2182 | ; |
2183 | scope.UpdateBuilder(&builder); |
2184 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2185 | if (!scope.ok()) return; |
2186 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2187 | this->operation = Operation(ret); |
2188 | this->output = Output(ret, 0); |
2189 | } |
2190 | |
2191 | Size::Size(const ::tensorflow::Scope& scope, ::tensorflow::Input input) |
2192 | : Size(scope, input, Size::Attrs()) {} |
2193 | |
2194 | Slice::Slice(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
2195 | ::tensorflow::Input begin, ::tensorflow::Input size) { |
2196 | if (!scope.ok()) return; |
2197 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2198 | if (!scope.ok()) return; |
2199 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
2200 | if (!scope.ok()) return; |
2201 | auto _size = ::tensorflow::ops::AsNodeOut(scope, size); |
2202 | if (!scope.ok()) return; |
2203 | ::tensorflow::Node* ret; |
2204 | const auto unique_name = scope.GetUniqueNameForOp("Slice" ); |
2205 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Slice" ) |
2206 | .Input(_input) |
2207 | .Input(_begin) |
2208 | .Input(_size) |
2209 | ; |
2210 | scope.UpdateBuilder(&builder); |
2211 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2212 | if (!scope.ok()) return; |
2213 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2214 | this->operation = Operation(ret); |
2215 | this->output = Output(ret, 0); |
2216 | } |
2217 | |
2218 | Snapshot::Snapshot(const ::tensorflow::Scope& scope, ::tensorflow::Input input) { |
2219 | if (!scope.ok()) return; |
2220 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2221 | if (!scope.ok()) return; |
2222 | ::tensorflow::Node* ret; |
2223 | const auto unique_name = scope.GetUniqueNameForOp("Snapshot" ); |
2224 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Snapshot" ) |
2225 | .Input(_input) |
2226 | ; |
2227 | scope.UpdateBuilder(&builder); |
2228 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2229 | if (!scope.ok()) return; |
2230 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2231 | this->operation = Operation(ret); |
2232 | this->output = Output(ret, 0); |
2233 | } |
2234 | |
2235 | SpaceToBatch::SpaceToBatch(const ::tensorflow::Scope& scope, |
2236 | ::tensorflow::Input input, ::tensorflow::Input |
2237 | paddings, int64 block_size) { |
2238 | if (!scope.ok()) return; |
2239 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2240 | if (!scope.ok()) return; |
2241 | auto _paddings = ::tensorflow::ops::AsNodeOut(scope, paddings); |
2242 | if (!scope.ok()) return; |
2243 | ::tensorflow::Node* ret; |
2244 | const auto unique_name = scope.GetUniqueNameForOp("SpaceToBatch" ); |
2245 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SpaceToBatch" ) |
2246 | .Input(_input) |
2247 | .Input(_paddings) |
2248 | .Attr("block_size" , block_size) |
2249 | ; |
2250 | scope.UpdateBuilder(&builder); |
2251 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2252 | if (!scope.ok()) return; |
2253 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2254 | this->operation = Operation(ret); |
2255 | this->output = Output(ret, 0); |
2256 | } |
2257 | |
2258 | SpaceToBatchND::SpaceToBatchND(const ::tensorflow::Scope& scope, |
2259 | ::tensorflow::Input input, ::tensorflow::Input |
2260 | block_shape, ::tensorflow::Input paddings) { |
2261 | if (!scope.ok()) return; |
2262 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2263 | if (!scope.ok()) return; |
2264 | auto _block_shape = ::tensorflow::ops::AsNodeOut(scope, block_shape); |
2265 | if (!scope.ok()) return; |
2266 | auto _paddings = ::tensorflow::ops::AsNodeOut(scope, paddings); |
2267 | if (!scope.ok()) return; |
2268 | ::tensorflow::Node* ret; |
2269 | const auto unique_name = scope.GetUniqueNameForOp("SpaceToBatchND" ); |
2270 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SpaceToBatchND" ) |
2271 | .Input(_input) |
2272 | .Input(_block_shape) |
2273 | .Input(_paddings) |
2274 | ; |
2275 | scope.UpdateBuilder(&builder); |
2276 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2277 | if (!scope.ok()) return; |
2278 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2279 | this->operation = Operation(ret); |
2280 | this->output = Output(ret, 0); |
2281 | } |
2282 | |
2283 | SpaceToDepth::SpaceToDepth(const ::tensorflow::Scope& scope, |
2284 | ::tensorflow::Input input, int64 block_size, const |
2285 | SpaceToDepth::Attrs& attrs) { |
2286 | if (!scope.ok()) return; |
2287 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2288 | if (!scope.ok()) return; |
2289 | ::tensorflow::Node* ret; |
2290 | const auto unique_name = scope.GetUniqueNameForOp("SpaceToDepth" ); |
2291 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SpaceToDepth" ) |
2292 | .Input(_input) |
2293 | .Attr("block_size" , block_size) |
2294 | .Attr("data_format" , attrs.data_format_) |
2295 | ; |
2296 | scope.UpdateBuilder(&builder); |
2297 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2298 | if (!scope.ok()) return; |
2299 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2300 | this->operation = Operation(ret); |
2301 | this->output = Output(ret, 0); |
2302 | } |
2303 | |
2304 | SpaceToDepth::SpaceToDepth(const ::tensorflow::Scope& scope, |
2305 | ::tensorflow::Input input, int64 block_size) |
2306 | : SpaceToDepth(scope, input, block_size, SpaceToDepth::Attrs()) {} |
2307 | |
2308 | Split::Split(const ::tensorflow::Scope& scope, ::tensorflow::Input axis, |
2309 | ::tensorflow::Input value, int64 num_split) { |
2310 | if (!scope.ok()) return; |
2311 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
2312 | if (!scope.ok()) return; |
2313 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
2314 | if (!scope.ok()) return; |
2315 | ::tensorflow::Node* ret; |
2316 | const auto unique_name = scope.GetUniqueNameForOp("Split" ); |
2317 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Split" ) |
2318 | .Input(_axis) |
2319 | .Input(_value) |
2320 | .Attr("num_split" , num_split) |
2321 | ; |
2322 | scope.UpdateBuilder(&builder); |
2323 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2324 | if (!scope.ok()) return; |
2325 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2326 | this->operation = Operation(ret); |
2327 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
2328 | this->output.push_back(Output(ret, i)); |
2329 | } |
2330 | |
2331 | SplitV::SplitV(const ::tensorflow::Scope& scope, ::tensorflow::Input value, |
2332 | ::tensorflow::Input size_splits, ::tensorflow::Input axis, int64 |
2333 | num_split) { |
2334 | if (!scope.ok()) return; |
2335 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
2336 | if (!scope.ok()) return; |
2337 | auto _size_splits = ::tensorflow::ops::AsNodeOut(scope, size_splits); |
2338 | if (!scope.ok()) return; |
2339 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
2340 | if (!scope.ok()) return; |
2341 | ::tensorflow::Node* ret; |
2342 | const auto unique_name = scope.GetUniqueNameForOp("SplitV" ); |
2343 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SplitV" ) |
2344 | .Input(_value) |
2345 | .Input(_size_splits) |
2346 | .Input(_axis) |
2347 | .Attr("num_split" , num_split) |
2348 | ; |
2349 | scope.UpdateBuilder(&builder); |
2350 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2351 | if (!scope.ok()) return; |
2352 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2353 | this->operation = Operation(ret); |
2354 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
2355 | this->output.push_back(Output(ret, i)); |
2356 | } |
2357 | |
2358 | Squeeze::Squeeze(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
2359 | const Squeeze::Attrs& attrs) { |
2360 | if (!scope.ok()) return; |
2361 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2362 | if (!scope.ok()) return; |
2363 | ::tensorflow::Node* ret; |
2364 | const auto unique_name = scope.GetUniqueNameForOp("Squeeze" ); |
2365 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Squeeze" ) |
2366 | .Input(_input) |
2367 | .Attr("squeeze_dims" , attrs.axis_) |
2368 | ; |
2369 | scope.UpdateBuilder(&builder); |
2370 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2371 | if (!scope.ok()) return; |
2372 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2373 | this->operation = Operation(ret); |
2374 | this->output = Output(ret, 0); |
2375 | } |
2376 | |
2377 | Squeeze::Squeeze(const ::tensorflow::Scope& scope, ::tensorflow::Input input) |
2378 | : Squeeze(scope, input, Squeeze::Attrs()) {} |
2379 | |
2380 | StopGradient::StopGradient(const ::tensorflow::Scope& scope, |
2381 | ::tensorflow::Input input) { |
2382 | if (!scope.ok()) return; |
2383 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2384 | if (!scope.ok()) return; |
2385 | ::tensorflow::Node* ret; |
2386 | const auto unique_name = scope.GetUniqueNameForOp("StopGradient" ); |
2387 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StopGradient" ) |
2388 | .Input(_input) |
2389 | ; |
2390 | scope.UpdateBuilder(&builder); |
2391 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2392 | if (!scope.ok()) return; |
2393 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2394 | this->operation = Operation(ret); |
2395 | this->output = Output(ret, 0); |
2396 | } |
2397 | |
2398 | StridedSlice::StridedSlice(const ::tensorflow::Scope& scope, |
2399 | ::tensorflow::Input input, ::tensorflow::Input |
2400 | begin, ::tensorflow::Input end, ::tensorflow::Input |
2401 | strides, const StridedSlice::Attrs& attrs) { |
2402 | if (!scope.ok()) return; |
2403 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2404 | if (!scope.ok()) return; |
2405 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
2406 | if (!scope.ok()) return; |
2407 | auto _end = ::tensorflow::ops::AsNodeOut(scope, end); |
2408 | if (!scope.ok()) return; |
2409 | auto _strides = ::tensorflow::ops::AsNodeOut(scope, strides); |
2410 | if (!scope.ok()) return; |
2411 | ::tensorflow::Node* ret; |
2412 | const auto unique_name = scope.GetUniqueNameForOp("StridedSlice" ); |
2413 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StridedSlice" ) |
2414 | .Input(_input) |
2415 | .Input(_begin) |
2416 | .Input(_end) |
2417 | .Input(_strides) |
2418 | .Attr("begin_mask" , attrs.begin_mask_) |
2419 | .Attr("end_mask" , attrs.end_mask_) |
2420 | .Attr("ellipsis_mask" , attrs.ellipsis_mask_) |
2421 | .Attr("new_axis_mask" , attrs.new_axis_mask_) |
2422 | .Attr("shrink_axis_mask" , attrs.shrink_axis_mask_) |
2423 | ; |
2424 | scope.UpdateBuilder(&builder); |
2425 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2426 | if (!scope.ok()) return; |
2427 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2428 | this->operation = Operation(ret); |
2429 | this->output = Output(ret, 0); |
2430 | } |
2431 | |
2432 | StridedSlice::StridedSlice(const ::tensorflow::Scope& scope, |
2433 | ::tensorflow::Input input, ::tensorflow::Input |
2434 | begin, ::tensorflow::Input end, ::tensorflow::Input |
2435 | strides) |
2436 | : StridedSlice(scope, input, begin, end, strides, StridedSlice::Attrs()) {} |
2437 | |
2438 | StridedSliceAssign::StridedSliceAssign(const ::tensorflow::Scope& scope, |
2439 | ::tensorflow::Input ref, |
2440 | ::tensorflow::Input begin, |
2441 | ::tensorflow::Input end, |
2442 | ::tensorflow::Input strides, |
2443 | ::tensorflow::Input value, const |
2444 | StridedSliceAssign::Attrs& attrs) { |
2445 | if (!scope.ok()) return; |
2446 | auto _ref = ::tensorflow::ops::AsNodeOut(scope, ref); |
2447 | if (!scope.ok()) return; |
2448 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
2449 | if (!scope.ok()) return; |
2450 | auto _end = ::tensorflow::ops::AsNodeOut(scope, end); |
2451 | if (!scope.ok()) return; |
2452 | auto _strides = ::tensorflow::ops::AsNodeOut(scope, strides); |
2453 | if (!scope.ok()) return; |
2454 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
2455 | if (!scope.ok()) return; |
2456 | ::tensorflow::Node* ret; |
2457 | const auto unique_name = scope.GetUniqueNameForOp("StridedSliceAssign" ); |
2458 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StridedSliceAssign" ) |
2459 | .Input(_ref) |
2460 | .Input(_begin) |
2461 | .Input(_end) |
2462 | .Input(_strides) |
2463 | .Input(_value) |
2464 | .Attr("begin_mask" , attrs.begin_mask_) |
2465 | .Attr("end_mask" , attrs.end_mask_) |
2466 | .Attr("ellipsis_mask" , attrs.ellipsis_mask_) |
2467 | .Attr("new_axis_mask" , attrs.new_axis_mask_) |
2468 | .Attr("shrink_axis_mask" , attrs.shrink_axis_mask_) |
2469 | ; |
2470 | scope.UpdateBuilder(&builder); |
2471 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2472 | if (!scope.ok()) return; |
2473 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2474 | this->operation = Operation(ret); |
2475 | this->output_ref = Output(ret, 0); |
2476 | } |
2477 | |
2478 | StridedSliceAssign::StridedSliceAssign(const ::tensorflow::Scope& scope, |
2479 | ::tensorflow::Input ref, |
2480 | ::tensorflow::Input begin, |
2481 | ::tensorflow::Input end, |
2482 | ::tensorflow::Input strides, |
2483 | ::tensorflow::Input value) |
2484 | : StridedSliceAssign(scope, ref, begin, end, strides, value, StridedSliceAssign::Attrs()) {} |
2485 | |
2486 | StridedSliceGrad::StridedSliceGrad(const ::tensorflow::Scope& scope, |
2487 | ::tensorflow::Input shape, |
2488 | ::tensorflow::Input begin, |
2489 | ::tensorflow::Input end, ::tensorflow::Input |
2490 | strides, ::tensorflow::Input dy, const |
2491 | StridedSliceGrad::Attrs& attrs) { |
2492 | if (!scope.ok()) return; |
2493 | auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape); |
2494 | if (!scope.ok()) return; |
2495 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
2496 | if (!scope.ok()) return; |
2497 | auto _end = ::tensorflow::ops::AsNodeOut(scope, end); |
2498 | if (!scope.ok()) return; |
2499 | auto _strides = ::tensorflow::ops::AsNodeOut(scope, strides); |
2500 | if (!scope.ok()) return; |
2501 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
2502 | if (!scope.ok()) return; |
2503 | ::tensorflow::Node* ret; |
2504 | const auto unique_name = scope.GetUniqueNameForOp("StridedSliceGrad" ); |
2505 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StridedSliceGrad" ) |
2506 | .Input(_shape) |
2507 | .Input(_begin) |
2508 | .Input(_end) |
2509 | .Input(_strides) |
2510 | .Input(_dy) |
2511 | .Attr("begin_mask" , attrs.begin_mask_) |
2512 | .Attr("end_mask" , attrs.end_mask_) |
2513 | .Attr("ellipsis_mask" , attrs.ellipsis_mask_) |
2514 | .Attr("new_axis_mask" , attrs.new_axis_mask_) |
2515 | .Attr("shrink_axis_mask" , attrs.shrink_axis_mask_) |
2516 | ; |
2517 | scope.UpdateBuilder(&builder); |
2518 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2519 | if (!scope.ok()) return; |
2520 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2521 | this->operation = Operation(ret); |
2522 | this->output = Output(ret, 0); |
2523 | } |
2524 | |
2525 | StridedSliceGrad::StridedSliceGrad(const ::tensorflow::Scope& scope, |
2526 | ::tensorflow::Input shape, |
2527 | ::tensorflow::Input begin, |
2528 | ::tensorflow::Input end, ::tensorflow::Input |
2529 | strides, ::tensorflow::Input dy) |
2530 | : StridedSliceGrad(scope, shape, begin, end, strides, dy, StridedSliceGrad::Attrs()) {} |
2531 | |
2532 | TensorScatterAdd::TensorScatterAdd(const ::tensorflow::Scope& scope, |
2533 | ::tensorflow::Input tensor, |
2534 | ::tensorflow::Input indices, |
2535 | ::tensorflow::Input updates) { |
2536 | if (!scope.ok()) return; |
2537 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2538 | if (!scope.ok()) return; |
2539 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2540 | if (!scope.ok()) return; |
2541 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2542 | if (!scope.ok()) return; |
2543 | ::tensorflow::Node* ret; |
2544 | const auto unique_name = scope.GetUniqueNameForOp("TensorScatterAdd" ); |
2545 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorScatterAdd" ) |
2546 | .Input(_tensor) |
2547 | .Input(_indices) |
2548 | .Input(_updates) |
2549 | ; |
2550 | scope.UpdateBuilder(&builder); |
2551 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2552 | if (!scope.ok()) return; |
2553 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2554 | this->operation = Operation(ret); |
2555 | this->output = Output(ret, 0); |
2556 | } |
2557 | |
2558 | TensorScatterMax::TensorScatterMax(const ::tensorflow::Scope& scope, |
2559 | ::tensorflow::Input tensor, |
2560 | ::tensorflow::Input indices, |
2561 | ::tensorflow::Input updates) { |
2562 | if (!scope.ok()) return; |
2563 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2564 | if (!scope.ok()) return; |
2565 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2566 | if (!scope.ok()) return; |
2567 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2568 | if (!scope.ok()) return; |
2569 | ::tensorflow::Node* ret; |
2570 | const auto unique_name = scope.GetUniqueNameForOp("TensorScatterMax" ); |
2571 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorScatterMax" ) |
2572 | .Input(_tensor) |
2573 | .Input(_indices) |
2574 | .Input(_updates) |
2575 | ; |
2576 | scope.UpdateBuilder(&builder); |
2577 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2578 | if (!scope.ok()) return; |
2579 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2580 | this->operation = Operation(ret); |
2581 | this->output = Output(ret, 0); |
2582 | } |
2583 | |
2584 | TensorScatterMin::TensorScatterMin(const ::tensorflow::Scope& scope, |
2585 | ::tensorflow::Input tensor, |
2586 | ::tensorflow::Input indices, |
2587 | ::tensorflow::Input updates) { |
2588 | if (!scope.ok()) return; |
2589 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2590 | if (!scope.ok()) return; |
2591 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2592 | if (!scope.ok()) return; |
2593 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2594 | if (!scope.ok()) return; |
2595 | ::tensorflow::Node* ret; |
2596 | const auto unique_name = scope.GetUniqueNameForOp("TensorScatterMin" ); |
2597 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorScatterMin" ) |
2598 | .Input(_tensor) |
2599 | .Input(_indices) |
2600 | .Input(_updates) |
2601 | ; |
2602 | scope.UpdateBuilder(&builder); |
2603 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2604 | if (!scope.ok()) return; |
2605 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2606 | this->operation = Operation(ret); |
2607 | this->output = Output(ret, 0); |
2608 | } |
2609 | |
2610 | TensorScatterSub::TensorScatterSub(const ::tensorflow::Scope& scope, |
2611 | ::tensorflow::Input tensor, |
2612 | ::tensorflow::Input indices, |
2613 | ::tensorflow::Input updates) { |
2614 | if (!scope.ok()) return; |
2615 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2616 | if (!scope.ok()) return; |
2617 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2618 | if (!scope.ok()) return; |
2619 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2620 | if (!scope.ok()) return; |
2621 | ::tensorflow::Node* ret; |
2622 | const auto unique_name = scope.GetUniqueNameForOp("TensorScatterSub" ); |
2623 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorScatterSub" ) |
2624 | .Input(_tensor) |
2625 | .Input(_indices) |
2626 | .Input(_updates) |
2627 | ; |
2628 | scope.UpdateBuilder(&builder); |
2629 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2630 | if (!scope.ok()) return; |
2631 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2632 | this->operation = Operation(ret); |
2633 | this->output = Output(ret, 0); |
2634 | } |
2635 | |
2636 | TensorScatterUpdate::TensorScatterUpdate(const ::tensorflow::Scope& scope, |
2637 | ::tensorflow::Input tensor, |
2638 | ::tensorflow::Input indices, |
2639 | ::tensorflow::Input updates) { |
2640 | if (!scope.ok()) return; |
2641 | auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor); |
2642 | if (!scope.ok()) return; |
2643 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2644 | if (!scope.ok()) return; |
2645 | auto _updates = ::tensorflow::ops::AsNodeOut(scope, updates); |
2646 | if (!scope.ok()) return; |
2647 | ::tensorflow::Node* ret; |
2648 | const auto unique_name = scope.GetUniqueNameForOp("TensorScatterUpdate" ); |
2649 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorScatterUpdate" ) |
2650 | .Input(_tensor) |
2651 | .Input(_indices) |
2652 | .Input(_updates) |
2653 | ; |
2654 | scope.UpdateBuilder(&builder); |
2655 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2656 | if (!scope.ok()) return; |
2657 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2658 | this->operation = Operation(ret); |
2659 | this->output = Output(ret, 0); |
2660 | } |
2661 | |
2662 | TensorStridedSliceUpdate::TensorStridedSliceUpdate(const ::tensorflow::Scope& |
2663 | scope, ::tensorflow::Input |
2664 | input, ::tensorflow::Input |
2665 | begin, ::tensorflow::Input |
2666 | end, ::tensorflow::Input |
2667 | strides, ::tensorflow::Input |
2668 | value, const |
2669 | TensorStridedSliceUpdate::Attrs& |
2670 | attrs) { |
2671 | if (!scope.ok()) return; |
2672 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2673 | if (!scope.ok()) return; |
2674 | auto _begin = ::tensorflow::ops::AsNodeOut(scope, begin); |
2675 | if (!scope.ok()) return; |
2676 | auto _end = ::tensorflow::ops::AsNodeOut(scope, end); |
2677 | if (!scope.ok()) return; |
2678 | auto _strides = ::tensorflow::ops::AsNodeOut(scope, strides); |
2679 | if (!scope.ok()) return; |
2680 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
2681 | if (!scope.ok()) return; |
2682 | ::tensorflow::Node* ret; |
2683 | const auto unique_name = scope.GetUniqueNameForOp("TensorStridedSliceUpdate" ); |
2684 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TensorStridedSliceUpdate" ) |
2685 | .Input(_input) |
2686 | .Input(_begin) |
2687 | .Input(_end) |
2688 | .Input(_strides) |
2689 | .Input(_value) |
2690 | .Attr("begin_mask" , attrs.begin_mask_) |
2691 | .Attr("end_mask" , attrs.end_mask_) |
2692 | .Attr("ellipsis_mask" , attrs.ellipsis_mask_) |
2693 | .Attr("new_axis_mask" , attrs.new_axis_mask_) |
2694 | .Attr("shrink_axis_mask" , attrs.shrink_axis_mask_) |
2695 | ; |
2696 | scope.UpdateBuilder(&builder); |
2697 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2698 | if (!scope.ok()) return; |
2699 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2700 | this->operation = Operation(ret); |
2701 | this->output = Output(ret, 0); |
2702 | } |
2703 | |
2704 | TensorStridedSliceUpdate::TensorStridedSliceUpdate(const ::tensorflow::Scope& |
2705 | scope, ::tensorflow::Input |
2706 | input, ::tensorflow::Input |
2707 | begin, ::tensorflow::Input |
2708 | end, ::tensorflow::Input |
2709 | strides, ::tensorflow::Input |
2710 | value) |
2711 | : TensorStridedSliceUpdate(scope, input, begin, end, strides, value, TensorStridedSliceUpdate::Attrs()) {} |
2712 | |
2713 | Tile::Tile(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
2714 | ::tensorflow::Input multiples) { |
2715 | if (!scope.ok()) return; |
2716 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
2717 | if (!scope.ok()) return; |
2718 | auto _multiples = ::tensorflow::ops::AsNodeOut(scope, multiples); |
2719 | if (!scope.ok()) return; |
2720 | ::tensorflow::Node* ret; |
2721 | const auto unique_name = scope.GetUniqueNameForOp("Tile" ); |
2722 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Tile" ) |
2723 | .Input(_input) |
2724 | .Input(_multiples) |
2725 | ; |
2726 | scope.UpdateBuilder(&builder); |
2727 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2728 | if (!scope.ok()) return; |
2729 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2730 | this->operation = Operation(ret); |
2731 | this->output = Output(ret, 0); |
2732 | } |
2733 | |
2734 | Transpose::Transpose(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
2735 | ::tensorflow::Input perm) { |
2736 | if (!scope.ok()) return; |
2737 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2738 | if (!scope.ok()) return; |
2739 | auto _perm = ::tensorflow::ops::AsNodeOut(scope, perm); |
2740 | if (!scope.ok()) return; |
2741 | ::tensorflow::Node* ret; |
2742 | const auto unique_name = scope.GetUniqueNameForOp("Transpose" ); |
2743 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Transpose" ) |
2744 | .Input(_x) |
2745 | .Input(_perm) |
2746 | ; |
2747 | scope.UpdateBuilder(&builder); |
2748 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2749 | if (!scope.ok()) return; |
2750 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2751 | this->operation = Operation(ret); |
2752 | this->y = Output(ret, 0); |
2753 | } |
2754 | |
2755 | Unique::Unique(const ::tensorflow::Scope& scope, ::tensorflow::Input x, const |
2756 | Unique::Attrs& attrs) { |
2757 | if (!scope.ok()) return; |
2758 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2759 | if (!scope.ok()) return; |
2760 | ::tensorflow::Node* ret; |
2761 | const auto unique_name = scope.GetUniqueNameForOp("Unique" ); |
2762 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Unique" ) |
2763 | .Input(_x) |
2764 | .Attr("out_idx" , attrs.out_idx_) |
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 | ::tensorflow::NameRangeMap _outputs_range; |
2772 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
2773 | if (!_status_.ok()) { |
2774 | scope.UpdateStatus(_status_); |
2775 | return; |
2776 | } |
2777 | |
2778 | this->y = Output(ret, _outputs_range["y" ].first); |
2779 | this->idx = Output(ret, _outputs_range["idx" ].first); |
2780 | } |
2781 | |
2782 | Unique::Unique(const ::tensorflow::Scope& scope, ::tensorflow::Input x) |
2783 | : Unique(scope, x, Unique::Attrs()) {} |
2784 | |
2785 | UniqueV2::UniqueV2(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
2786 | ::tensorflow::Input axis, const UniqueV2::Attrs& attrs) { |
2787 | if (!scope.ok()) return; |
2788 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2789 | if (!scope.ok()) return; |
2790 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
2791 | if (!scope.ok()) return; |
2792 | ::tensorflow::Node* ret; |
2793 | const auto unique_name = scope.GetUniqueNameForOp("UniqueV2" ); |
2794 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UniqueV2" ) |
2795 | .Input(_x) |
2796 | .Input(_axis) |
2797 | .Attr("out_idx" , attrs.out_idx_) |
2798 | ; |
2799 | scope.UpdateBuilder(&builder); |
2800 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2801 | if (!scope.ok()) return; |
2802 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2803 | this->operation = Operation(ret); |
2804 | ::tensorflow::NameRangeMap _outputs_range; |
2805 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
2806 | if (!_status_.ok()) { |
2807 | scope.UpdateStatus(_status_); |
2808 | return; |
2809 | } |
2810 | |
2811 | this->y = Output(ret, _outputs_range["y" ].first); |
2812 | this->idx = Output(ret, _outputs_range["idx" ].first); |
2813 | } |
2814 | |
2815 | UniqueV2::UniqueV2(const ::tensorflow::Scope& scope, ::tensorflow::Input x, |
2816 | ::tensorflow::Input axis) |
2817 | : UniqueV2(scope, x, axis, UniqueV2::Attrs()) {} |
2818 | |
2819 | UniqueWithCounts::UniqueWithCounts(const ::tensorflow::Scope& scope, |
2820 | ::tensorflow::Input x, const |
2821 | UniqueWithCounts::Attrs& attrs) { |
2822 | if (!scope.ok()) return; |
2823 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2824 | if (!scope.ok()) return; |
2825 | ::tensorflow::Node* ret; |
2826 | const auto unique_name = scope.GetUniqueNameForOp("UniqueWithCounts" ); |
2827 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UniqueWithCounts" ) |
2828 | .Input(_x) |
2829 | .Attr("out_idx" , attrs.out_idx_) |
2830 | ; |
2831 | scope.UpdateBuilder(&builder); |
2832 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2833 | if (!scope.ok()) return; |
2834 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2835 | this->operation = Operation(ret); |
2836 | ::tensorflow::NameRangeMap _outputs_range; |
2837 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
2838 | if (!_status_.ok()) { |
2839 | scope.UpdateStatus(_status_); |
2840 | return; |
2841 | } |
2842 | |
2843 | this->y = Output(ret, _outputs_range["y" ].first); |
2844 | this->idx = Output(ret, _outputs_range["idx" ].first); |
2845 | this->count = Output(ret, _outputs_range["count" ].first); |
2846 | } |
2847 | |
2848 | UniqueWithCounts::UniqueWithCounts(const ::tensorflow::Scope& scope, |
2849 | ::tensorflow::Input x) |
2850 | : UniqueWithCounts(scope, x, UniqueWithCounts::Attrs()) {} |
2851 | |
2852 | UniqueWithCountsV2::UniqueWithCountsV2(const ::tensorflow::Scope& scope, |
2853 | ::tensorflow::Input x, |
2854 | ::tensorflow::Input axis, const |
2855 | UniqueWithCountsV2::Attrs& attrs) { |
2856 | if (!scope.ok()) return; |
2857 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2858 | if (!scope.ok()) return; |
2859 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
2860 | if (!scope.ok()) return; |
2861 | ::tensorflow::Node* ret; |
2862 | const auto unique_name = scope.GetUniqueNameForOp("UniqueWithCountsV2" ); |
2863 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UniqueWithCountsV2" ) |
2864 | .Input(_x) |
2865 | .Input(_axis) |
2866 | .Attr("out_idx" , attrs.out_idx_) |
2867 | ; |
2868 | scope.UpdateBuilder(&builder); |
2869 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2870 | if (!scope.ok()) return; |
2871 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2872 | this->operation = Operation(ret); |
2873 | ::tensorflow::NameRangeMap _outputs_range; |
2874 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
2875 | if (!_status_.ok()) { |
2876 | scope.UpdateStatus(_status_); |
2877 | return; |
2878 | } |
2879 | |
2880 | this->y = Output(ret, _outputs_range["y" ].first); |
2881 | this->idx = Output(ret, _outputs_range["idx" ].first); |
2882 | this->count = Output(ret, _outputs_range["count" ].first); |
2883 | } |
2884 | |
2885 | UniqueWithCountsV2::UniqueWithCountsV2(const ::tensorflow::Scope& scope, |
2886 | ::tensorflow::Input x, |
2887 | ::tensorflow::Input axis) |
2888 | : UniqueWithCountsV2(scope, x, axis, UniqueWithCountsV2::Attrs()) {} |
2889 | |
2890 | Unstack::Unstack(const ::tensorflow::Scope& scope, ::tensorflow::Input value, |
2891 | int64 num, const Unstack::Attrs& attrs) { |
2892 | if (!scope.ok()) return; |
2893 | auto _value = ::tensorflow::ops::AsNodeOut(scope, value); |
2894 | if (!scope.ok()) return; |
2895 | ::tensorflow::Node* ret; |
2896 | const auto unique_name = scope.GetUniqueNameForOp("Unstack" ); |
2897 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Unpack" ) |
2898 | .Input(_value) |
2899 | .Attr("num" , num) |
2900 | .Attr("axis" , attrs.axis_) |
2901 | ; |
2902 | scope.UpdateBuilder(&builder); |
2903 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2904 | if (!scope.ok()) return; |
2905 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2906 | this->operation = Operation(ret); |
2907 | for (int32 i = 0; i < ret->num_outputs(); ++i) |
2908 | this->output.push_back(Output(ret, i)); |
2909 | } |
2910 | |
2911 | Unstack::Unstack(const ::tensorflow::Scope& scope, ::tensorflow::Input value, |
2912 | int64 num) |
2913 | : Unstack(scope, value, num, Unstack::Attrs()) {} |
2914 | |
2915 | UnravelIndex::UnravelIndex(const ::tensorflow::Scope& scope, |
2916 | ::tensorflow::Input indices, ::tensorflow::Input |
2917 | dims) { |
2918 | if (!scope.ok()) return; |
2919 | auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices); |
2920 | if (!scope.ok()) return; |
2921 | auto _dims = ::tensorflow::ops::AsNodeOut(scope, dims); |
2922 | if (!scope.ok()) return; |
2923 | ::tensorflow::Node* ret; |
2924 | const auto unique_name = scope.GetUniqueNameForOp("UnravelIndex" ); |
2925 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnravelIndex" ) |
2926 | .Input(_indices) |
2927 | .Input(_dims) |
2928 | ; |
2929 | scope.UpdateBuilder(&builder); |
2930 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2931 | if (!scope.ok()) return; |
2932 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2933 | this->operation = Operation(ret); |
2934 | this->output = Output(ret, 0); |
2935 | } |
2936 | |
2937 | Where::Where(const ::tensorflow::Scope& scope, ::tensorflow::Input condition) { |
2938 | if (!scope.ok()) return; |
2939 | auto _condition = ::tensorflow::ops::AsNodeOut(scope, condition); |
2940 | if (!scope.ok()) return; |
2941 | ::tensorflow::Node* ret; |
2942 | const auto unique_name = scope.GetUniqueNameForOp("Where" ); |
2943 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Where" ) |
2944 | .Input(_condition) |
2945 | ; |
2946 | scope.UpdateBuilder(&builder); |
2947 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2948 | if (!scope.ok()) return; |
2949 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2950 | this->operation = Operation(ret); |
2951 | this->index = Output(ret, 0); |
2952 | } |
2953 | |
2954 | ZerosLike::ZerosLike(const ::tensorflow::Scope& scope, ::tensorflow::Input x) { |
2955 | if (!scope.ok()) return; |
2956 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
2957 | if (!scope.ok()) return; |
2958 | ::tensorflow::Node* ret; |
2959 | const auto unique_name = scope.GetUniqueNameForOp("ZerosLike" ); |
2960 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ZerosLike" ) |
2961 | .Input(_x) |
2962 | ; |
2963 | scope.UpdateBuilder(&builder); |
2964 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2965 | if (!scope.ok()) return; |
2966 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2967 | this->operation = Operation(ret); |
2968 | this->y = Output(ret, 0); |
2969 | } |
2970 | |
2971 | /// @} |
2972 | |
2973 | } // namespace ops |
2974 | } // namespace tensorflow |
2975 | |