1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/image_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10AdjustContrast::AdjustContrast(const ::tensorflow::Scope& scope,
11 ::tensorflow::Input images, ::tensorflow::Input
12 contrast_factor) {
13 if (!scope.ok()) return;
14 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
15 if (!scope.ok()) return;
16 auto _contrast_factor = ::tensorflow::ops::AsNodeOut(scope, contrast_factor);
17 if (!scope.ok()) return;
18 ::tensorflow::Node* ret;
19 const auto unique_name = scope.GetUniqueNameForOp("AdjustContrast");
20 auto builder = ::tensorflow::NodeBuilder(unique_name, "AdjustContrastv2")
21 .Input(_images)
22 .Input(_contrast_factor)
23 ;
24 scope.UpdateBuilder(&builder);
25 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
26 if (!scope.ok()) return;
27 scope.UpdateStatus(scope.DoShapeInference(ret));
28 this->operation = Operation(ret);
29 this->output = Output(ret, 0);
30}
31
32AdjustHue::AdjustHue(const ::tensorflow::Scope& scope, ::tensorflow::Input
33 images, ::tensorflow::Input delta) {
34 if (!scope.ok()) return;
35 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
36 if (!scope.ok()) return;
37 auto _delta = ::tensorflow::ops::AsNodeOut(scope, delta);
38 if (!scope.ok()) return;
39 ::tensorflow::Node* ret;
40 const auto unique_name = scope.GetUniqueNameForOp("AdjustHue");
41 auto builder = ::tensorflow::NodeBuilder(unique_name, "AdjustHue")
42 .Input(_images)
43 .Input(_delta)
44 ;
45 scope.UpdateBuilder(&builder);
46 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
47 if (!scope.ok()) return;
48 scope.UpdateStatus(scope.DoShapeInference(ret));
49 this->operation = Operation(ret);
50 this->output = Output(ret, 0);
51}
52
53AdjustSaturation::AdjustSaturation(const ::tensorflow::Scope& scope,
54 ::tensorflow::Input images,
55 ::tensorflow::Input scale) {
56 if (!scope.ok()) return;
57 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
58 if (!scope.ok()) return;
59 auto _scale = ::tensorflow::ops::AsNodeOut(scope, scale);
60 if (!scope.ok()) return;
61 ::tensorflow::Node* ret;
62 const auto unique_name = scope.GetUniqueNameForOp("AdjustSaturation");
63 auto builder = ::tensorflow::NodeBuilder(unique_name, "AdjustSaturation")
64 .Input(_images)
65 .Input(_scale)
66 ;
67 scope.UpdateBuilder(&builder);
68 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
69 if (!scope.ok()) return;
70 scope.UpdateStatus(scope.DoShapeInference(ret));
71 this->operation = Operation(ret);
72 this->output = Output(ret, 0);
73}
74
75CombinedNonMaxSuppression::CombinedNonMaxSuppression(const ::tensorflow::Scope&
76 scope, ::tensorflow::Input
77 boxes, ::tensorflow::Input
78 scores,
79 ::tensorflow::Input
80 max_output_size_per_class,
81 ::tensorflow::Input
82 max_total_size,
83 ::tensorflow::Input
84 iou_threshold,
85 ::tensorflow::Input
86 score_threshold, const
87 CombinedNonMaxSuppression::Attrs&
88 attrs) {
89 if (!scope.ok()) return;
90 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
91 if (!scope.ok()) return;
92 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
93 if (!scope.ok()) return;
94 auto _max_output_size_per_class = ::tensorflow::ops::AsNodeOut(scope, max_output_size_per_class);
95 if (!scope.ok()) return;
96 auto _max_total_size = ::tensorflow::ops::AsNodeOut(scope, max_total_size);
97 if (!scope.ok()) return;
98 auto _iou_threshold = ::tensorflow::ops::AsNodeOut(scope, iou_threshold);
99 if (!scope.ok()) return;
100 auto _score_threshold = ::tensorflow::ops::AsNodeOut(scope, score_threshold);
101 if (!scope.ok()) return;
102 ::tensorflow::Node* ret;
103 const auto unique_name = scope.GetUniqueNameForOp("CombinedNonMaxSuppression");
104 auto builder = ::tensorflow::NodeBuilder(unique_name, "CombinedNonMaxSuppression")
105 .Input(_boxes)
106 .Input(_scores)
107 .Input(_max_output_size_per_class)
108 .Input(_max_total_size)
109 .Input(_iou_threshold)
110 .Input(_score_threshold)
111 .Attr("pad_per_class", attrs.pad_per_class_)
112 .Attr("clip_boxes", attrs.clip_boxes_)
113 ;
114 scope.UpdateBuilder(&builder);
115 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
116 if (!scope.ok()) return;
117 scope.UpdateStatus(scope.DoShapeInference(ret));
118 this->operation = Operation(ret);
119 ::tensorflow::NameRangeMap _outputs_range;
120 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
121 if (!_status_.ok()) {
122 scope.UpdateStatus(_status_);
123 return;
124 }
125
126 this->nmsed_boxes = Output(ret, _outputs_range["nmsed_boxes"].first);
127 this->nmsed_scores = Output(ret, _outputs_range["nmsed_scores"].first);
128 this->nmsed_classes = Output(ret, _outputs_range["nmsed_classes"].first);
129 this->valid_detections = Output(ret, _outputs_range["valid_detections"].first);
130}
131
132CombinedNonMaxSuppression::CombinedNonMaxSuppression(const ::tensorflow::Scope&
133 scope, ::tensorflow::Input
134 boxes, ::tensorflow::Input
135 scores,
136 ::tensorflow::Input
137 max_output_size_per_class,
138 ::tensorflow::Input
139 max_total_size,
140 ::tensorflow::Input
141 iou_threshold,
142 ::tensorflow::Input
143 score_threshold)
144 : CombinedNonMaxSuppression(scope, boxes, scores, max_output_size_per_class, max_total_size, iou_threshold, score_threshold, CombinedNonMaxSuppression::Attrs()) {}
145
146CropAndResize::CropAndResize(const ::tensorflow::Scope& scope,
147 ::tensorflow::Input image, ::tensorflow::Input
148 boxes, ::tensorflow::Input box_ind,
149 ::tensorflow::Input crop_size, const
150 CropAndResize::Attrs& attrs) {
151 if (!scope.ok()) return;
152 auto _image = ::tensorflow::ops::AsNodeOut(scope, image);
153 if (!scope.ok()) return;
154 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
155 if (!scope.ok()) return;
156 auto _box_ind = ::tensorflow::ops::AsNodeOut(scope, box_ind);
157 if (!scope.ok()) return;
158 auto _crop_size = ::tensorflow::ops::AsNodeOut(scope, crop_size);
159 if (!scope.ok()) return;
160 ::tensorflow::Node* ret;
161 const auto unique_name = scope.GetUniqueNameForOp("CropAndResize");
162 auto builder = ::tensorflow::NodeBuilder(unique_name, "CropAndResize")
163 .Input(_image)
164 .Input(_boxes)
165 .Input(_box_ind)
166 .Input(_crop_size)
167 .Attr("method", attrs.method_)
168 .Attr("extrapolation_value", attrs.extrapolation_value_)
169 ;
170 scope.UpdateBuilder(&builder);
171 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
172 if (!scope.ok()) return;
173 scope.UpdateStatus(scope.DoShapeInference(ret));
174 this->operation = Operation(ret);
175 this->crops = Output(ret, 0);
176}
177
178CropAndResize::CropAndResize(const ::tensorflow::Scope& scope,
179 ::tensorflow::Input image, ::tensorflow::Input
180 boxes, ::tensorflow::Input box_ind,
181 ::tensorflow::Input crop_size)
182 : CropAndResize(scope, image, boxes, box_ind, crop_size, CropAndResize::Attrs()) {}
183
184CropAndResizeGradBoxes::CropAndResizeGradBoxes(const ::tensorflow::Scope&
185 scope, ::tensorflow::Input
186 grads, ::tensorflow::Input
187 image, ::tensorflow::Input
188 boxes, ::tensorflow::Input
189 box_ind, const
190 CropAndResizeGradBoxes::Attrs&
191 attrs) {
192 if (!scope.ok()) return;
193 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
194 if (!scope.ok()) return;
195 auto _image = ::tensorflow::ops::AsNodeOut(scope, image);
196 if (!scope.ok()) return;
197 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
198 if (!scope.ok()) return;
199 auto _box_ind = ::tensorflow::ops::AsNodeOut(scope, box_ind);
200 if (!scope.ok()) return;
201 ::tensorflow::Node* ret;
202 const auto unique_name = scope.GetUniqueNameForOp("CropAndResizeGradBoxes");
203 auto builder = ::tensorflow::NodeBuilder(unique_name, "CropAndResizeGradBoxes")
204 .Input(_grads)
205 .Input(_image)
206 .Input(_boxes)
207 .Input(_box_ind)
208 .Attr("method", attrs.method_)
209 ;
210 scope.UpdateBuilder(&builder);
211 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
212 if (!scope.ok()) return;
213 scope.UpdateStatus(scope.DoShapeInference(ret));
214 this->operation = Operation(ret);
215 this->output = Output(ret, 0);
216}
217
218CropAndResizeGradBoxes::CropAndResizeGradBoxes(const ::tensorflow::Scope&
219 scope, ::tensorflow::Input
220 grads, ::tensorflow::Input
221 image, ::tensorflow::Input
222 boxes, ::tensorflow::Input
223 box_ind)
224 : CropAndResizeGradBoxes(scope, grads, image, boxes, box_ind, CropAndResizeGradBoxes::Attrs()) {}
225
226CropAndResizeGradImage::CropAndResizeGradImage(const ::tensorflow::Scope&
227 scope, ::tensorflow::Input
228 grads, ::tensorflow::Input
229 boxes, ::tensorflow::Input
230 box_ind, ::tensorflow::Input
231 image_size, DataType T, const
232 CropAndResizeGradImage::Attrs&
233 attrs) {
234 if (!scope.ok()) return;
235 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
236 if (!scope.ok()) return;
237 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
238 if (!scope.ok()) return;
239 auto _box_ind = ::tensorflow::ops::AsNodeOut(scope, box_ind);
240 if (!scope.ok()) return;
241 auto _image_size = ::tensorflow::ops::AsNodeOut(scope, image_size);
242 if (!scope.ok()) return;
243 ::tensorflow::Node* ret;
244 const auto unique_name = scope.GetUniqueNameForOp("CropAndResizeGradImage");
245 auto builder = ::tensorflow::NodeBuilder(unique_name, "CropAndResizeGradImage")
246 .Input(_grads)
247 .Input(_boxes)
248 .Input(_box_ind)
249 .Input(_image_size)
250 .Attr("T", T)
251 .Attr("method", attrs.method_)
252 ;
253 scope.UpdateBuilder(&builder);
254 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
255 if (!scope.ok()) return;
256 scope.UpdateStatus(scope.DoShapeInference(ret));
257 this->operation = Operation(ret);
258 this->output = Output(ret, 0);
259}
260
261CropAndResizeGradImage::CropAndResizeGradImage(const ::tensorflow::Scope&
262 scope, ::tensorflow::Input
263 grads, ::tensorflow::Input
264 boxes, ::tensorflow::Input
265 box_ind, ::tensorflow::Input
266 image_size, DataType T)
267 : CropAndResizeGradImage(scope, grads, boxes, box_ind, image_size, T, CropAndResizeGradImage::Attrs()) {}
268
269DecodeAndCropJpeg::DecodeAndCropJpeg(const ::tensorflow::Scope& scope,
270 ::tensorflow::Input contents,
271 ::tensorflow::Input crop_window, const
272 DecodeAndCropJpeg::Attrs& attrs) {
273 if (!scope.ok()) return;
274 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
275 if (!scope.ok()) return;
276 auto _crop_window = ::tensorflow::ops::AsNodeOut(scope, crop_window);
277 if (!scope.ok()) return;
278 ::tensorflow::Node* ret;
279 const auto unique_name = scope.GetUniqueNameForOp("DecodeAndCropJpeg");
280 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeAndCropJpeg")
281 .Input(_contents)
282 .Input(_crop_window)
283 .Attr("channels", attrs.channels_)
284 .Attr("ratio", attrs.ratio_)
285 .Attr("fancy_upscaling", attrs.fancy_upscaling_)
286 .Attr("try_recover_truncated", attrs.try_recover_truncated_)
287 .Attr("acceptable_fraction", attrs.acceptable_fraction_)
288 .Attr("dct_method", attrs.dct_method_)
289 ;
290 scope.UpdateBuilder(&builder);
291 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
292 if (!scope.ok()) return;
293 scope.UpdateStatus(scope.DoShapeInference(ret));
294 this->operation = Operation(ret);
295 this->image = Output(ret, 0);
296}
297
298DecodeAndCropJpeg::DecodeAndCropJpeg(const ::tensorflow::Scope& scope,
299 ::tensorflow::Input contents,
300 ::tensorflow::Input crop_window)
301 : DecodeAndCropJpeg(scope, contents, crop_window, DecodeAndCropJpeg::Attrs()) {}
302
303DecodeBmp::DecodeBmp(const ::tensorflow::Scope& scope, ::tensorflow::Input
304 contents, const DecodeBmp::Attrs& attrs) {
305 if (!scope.ok()) return;
306 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
307 if (!scope.ok()) return;
308 ::tensorflow::Node* ret;
309 const auto unique_name = scope.GetUniqueNameForOp("DecodeBmp");
310 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeBmp")
311 .Input(_contents)
312 .Attr("channels", attrs.channels_)
313 ;
314 scope.UpdateBuilder(&builder);
315 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
316 if (!scope.ok()) return;
317 scope.UpdateStatus(scope.DoShapeInference(ret));
318 this->operation = Operation(ret);
319 this->image = Output(ret, 0);
320}
321
322DecodeBmp::DecodeBmp(const ::tensorflow::Scope& scope, ::tensorflow::Input
323 contents)
324 : DecodeBmp(scope, contents, DecodeBmp::Attrs()) {}
325
326DecodeGif::DecodeGif(const ::tensorflow::Scope& scope, ::tensorflow::Input
327 contents) {
328 if (!scope.ok()) return;
329 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
330 if (!scope.ok()) return;
331 ::tensorflow::Node* ret;
332 const auto unique_name = scope.GetUniqueNameForOp("DecodeGif");
333 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeGif")
334 .Input(_contents)
335 ;
336 scope.UpdateBuilder(&builder);
337 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
338 if (!scope.ok()) return;
339 scope.UpdateStatus(scope.DoShapeInference(ret));
340 this->operation = Operation(ret);
341 this->image = Output(ret, 0);
342}
343
344DecodeImage::DecodeImage(const ::tensorflow::Scope& scope, ::tensorflow::Input
345 contents, const DecodeImage::Attrs& attrs) {
346 if (!scope.ok()) return;
347 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
348 if (!scope.ok()) return;
349 ::tensorflow::Node* ret;
350 const auto unique_name = scope.GetUniqueNameForOp("DecodeImage");
351 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeImage")
352 .Input(_contents)
353 .Attr("channels", attrs.channels_)
354 .Attr("dtype", attrs.dtype_)
355 .Attr("expand_animations", attrs.expand_animations_)
356 ;
357 scope.UpdateBuilder(&builder);
358 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
359 if (!scope.ok()) return;
360 scope.UpdateStatus(scope.DoShapeInference(ret));
361 this->operation = Operation(ret);
362 this->image = Output(ret, 0);
363}
364
365DecodeImage::DecodeImage(const ::tensorflow::Scope& scope, ::tensorflow::Input
366 contents)
367 : DecodeImage(scope, contents, DecodeImage::Attrs()) {}
368
369DecodeJpeg::DecodeJpeg(const ::tensorflow::Scope& scope, ::tensorflow::Input
370 contents, const DecodeJpeg::Attrs& attrs) {
371 if (!scope.ok()) return;
372 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
373 if (!scope.ok()) return;
374 ::tensorflow::Node* ret;
375 const auto unique_name = scope.GetUniqueNameForOp("DecodeJpeg");
376 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeJpeg")
377 .Input(_contents)
378 .Attr("channels", attrs.channels_)
379 .Attr("ratio", attrs.ratio_)
380 .Attr("fancy_upscaling", attrs.fancy_upscaling_)
381 .Attr("try_recover_truncated", attrs.try_recover_truncated_)
382 .Attr("acceptable_fraction", attrs.acceptable_fraction_)
383 .Attr("dct_method", attrs.dct_method_)
384 ;
385 scope.UpdateBuilder(&builder);
386 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
387 if (!scope.ok()) return;
388 scope.UpdateStatus(scope.DoShapeInference(ret));
389 this->operation = Operation(ret);
390 this->image = Output(ret, 0);
391}
392
393DecodeJpeg::DecodeJpeg(const ::tensorflow::Scope& scope, ::tensorflow::Input
394 contents)
395 : DecodeJpeg(scope, contents, DecodeJpeg::Attrs()) {}
396
397DecodePng::DecodePng(const ::tensorflow::Scope& scope, ::tensorflow::Input
398 contents, const DecodePng::Attrs& attrs) {
399 if (!scope.ok()) return;
400 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
401 if (!scope.ok()) return;
402 ::tensorflow::Node* ret;
403 const auto unique_name = scope.GetUniqueNameForOp("DecodePng");
404 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodePng")
405 .Input(_contents)
406 .Attr("channels", attrs.channels_)
407 .Attr("dtype", attrs.dtype_)
408 ;
409 scope.UpdateBuilder(&builder);
410 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
411 if (!scope.ok()) return;
412 scope.UpdateStatus(scope.DoShapeInference(ret));
413 this->operation = Operation(ret);
414 this->image = Output(ret, 0);
415}
416
417DecodePng::DecodePng(const ::tensorflow::Scope& scope, ::tensorflow::Input
418 contents)
419 : DecodePng(scope, contents, DecodePng::Attrs()) {}
420
421DrawBoundingBoxes::DrawBoundingBoxes(const ::tensorflow::Scope& scope,
422 ::tensorflow::Input images,
423 ::tensorflow::Input boxes) {
424 if (!scope.ok()) return;
425 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
426 if (!scope.ok()) return;
427 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
428 if (!scope.ok()) return;
429 ::tensorflow::Node* ret;
430 const auto unique_name = scope.GetUniqueNameForOp("DrawBoundingBoxes");
431 auto builder = ::tensorflow::NodeBuilder(unique_name, "DrawBoundingBoxes")
432 .Input(_images)
433 .Input(_boxes)
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
443DrawBoundingBoxesV2::DrawBoundingBoxesV2(const ::tensorflow::Scope& scope,
444 ::tensorflow::Input images,
445 ::tensorflow::Input boxes,
446 ::tensorflow::Input colors) {
447 if (!scope.ok()) return;
448 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
449 if (!scope.ok()) return;
450 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
451 if (!scope.ok()) return;
452 auto _colors = ::tensorflow::ops::AsNodeOut(scope, colors);
453 if (!scope.ok()) return;
454 ::tensorflow::Node* ret;
455 const auto unique_name = scope.GetUniqueNameForOp("DrawBoundingBoxesV2");
456 auto builder = ::tensorflow::NodeBuilder(unique_name, "DrawBoundingBoxesV2")
457 .Input(_images)
458 .Input(_boxes)
459 .Input(_colors)
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->output = Output(ret, 0);
467}
468
469EncodeJpeg::EncodeJpeg(const ::tensorflow::Scope& scope, ::tensorflow::Input
470 image, const EncodeJpeg::Attrs& attrs) {
471 if (!scope.ok()) return;
472 auto _image = ::tensorflow::ops::AsNodeOut(scope, image);
473 if (!scope.ok()) return;
474 ::tensorflow::Node* ret;
475 const auto unique_name = scope.GetUniqueNameForOp("EncodeJpeg");
476 auto builder = ::tensorflow::NodeBuilder(unique_name, "EncodeJpeg")
477 .Input(_image)
478 .Attr("format", attrs.format_)
479 .Attr("quality", attrs.quality_)
480 .Attr("progressive", attrs.progressive_)
481 .Attr("optimize_size", attrs.optimize_size_)
482 .Attr("chroma_downsampling", attrs.chroma_downsampling_)
483 .Attr("density_unit", attrs.density_unit_)
484 .Attr("x_density", attrs.x_density_)
485 .Attr("y_density", attrs.y_density_)
486 .Attr("xmp_metadata", attrs.xmp_metadata_)
487 ;
488 scope.UpdateBuilder(&builder);
489 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
490 if (!scope.ok()) return;
491 scope.UpdateStatus(scope.DoShapeInference(ret));
492 this->operation = Operation(ret);
493 this->contents = Output(ret, 0);
494}
495
496EncodeJpeg::EncodeJpeg(const ::tensorflow::Scope& scope, ::tensorflow::Input
497 image)
498 : EncodeJpeg(scope, image, EncodeJpeg::Attrs()) {}
499
500EncodeJpegVariableQuality::EncodeJpegVariableQuality(const ::tensorflow::Scope&
501 scope, ::tensorflow::Input
502 images,
503 ::tensorflow::Input
504 quality) {
505 if (!scope.ok()) return;
506 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
507 if (!scope.ok()) return;
508 auto _quality = ::tensorflow::ops::AsNodeOut(scope, quality);
509 if (!scope.ok()) return;
510 ::tensorflow::Node* ret;
511 const auto unique_name = scope.GetUniqueNameForOp("EncodeJpegVariableQuality");
512 auto builder = ::tensorflow::NodeBuilder(unique_name, "EncodeJpegVariableQuality")
513 .Input(_images)
514 .Input(_quality)
515 ;
516 scope.UpdateBuilder(&builder);
517 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
518 if (!scope.ok()) return;
519 scope.UpdateStatus(scope.DoShapeInference(ret));
520 this->operation = Operation(ret);
521 this->contents = Output(ret, 0);
522}
523
524EncodePng::EncodePng(const ::tensorflow::Scope& scope, ::tensorflow::Input
525 image, const EncodePng::Attrs& attrs) {
526 if (!scope.ok()) return;
527 auto _image = ::tensorflow::ops::AsNodeOut(scope, image);
528 if (!scope.ok()) return;
529 ::tensorflow::Node* ret;
530 const auto unique_name = scope.GetUniqueNameForOp("EncodePng");
531 auto builder = ::tensorflow::NodeBuilder(unique_name, "EncodePng")
532 .Input(_image)
533 .Attr("compression", attrs.compression_)
534 ;
535 scope.UpdateBuilder(&builder);
536 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
537 if (!scope.ok()) return;
538 scope.UpdateStatus(scope.DoShapeInference(ret));
539 this->operation = Operation(ret);
540 this->contents = Output(ret, 0);
541}
542
543EncodePng::EncodePng(const ::tensorflow::Scope& scope, ::tensorflow::Input
544 image)
545 : EncodePng(scope, image, EncodePng::Attrs()) {}
546
547ExtractGlimpse::ExtractGlimpse(const ::tensorflow::Scope& scope,
548 ::tensorflow::Input input, ::tensorflow::Input
549 size, ::tensorflow::Input offsets, const
550 ExtractGlimpse::Attrs& attrs) {
551 if (!scope.ok()) return;
552 auto _input = ::tensorflow::ops::AsNodeOut(scope, input);
553 if (!scope.ok()) return;
554 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
555 if (!scope.ok()) return;
556 auto _offsets = ::tensorflow::ops::AsNodeOut(scope, offsets);
557 if (!scope.ok()) return;
558 ::tensorflow::Node* ret;
559 const auto unique_name = scope.GetUniqueNameForOp("ExtractGlimpse");
560 auto builder = ::tensorflow::NodeBuilder(unique_name, "ExtractGlimpse")
561 .Input(_input)
562 .Input(_size)
563 .Input(_offsets)
564 .Attr("centered", attrs.centered_)
565 .Attr("normalized", attrs.normalized_)
566 .Attr("uniform_noise", attrs.uniform_noise_)
567 .Attr("noise", attrs.noise_)
568 ;
569 scope.UpdateBuilder(&builder);
570 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
571 if (!scope.ok()) return;
572 scope.UpdateStatus(scope.DoShapeInference(ret));
573 this->operation = Operation(ret);
574 this->glimpse = Output(ret, 0);
575}
576
577ExtractGlimpse::ExtractGlimpse(const ::tensorflow::Scope& scope,
578 ::tensorflow::Input input, ::tensorflow::Input
579 size, ::tensorflow::Input offsets)
580 : ExtractGlimpse(scope, input, size, offsets, ExtractGlimpse::Attrs()) {}
581
582ExtractJpegShape::ExtractJpegShape(const ::tensorflow::Scope& scope,
583 ::tensorflow::Input contents, const
584 ExtractJpegShape::Attrs& attrs) {
585 if (!scope.ok()) return;
586 auto _contents = ::tensorflow::ops::AsNodeOut(scope, contents);
587 if (!scope.ok()) return;
588 ::tensorflow::Node* ret;
589 const auto unique_name = scope.GetUniqueNameForOp("ExtractJpegShape");
590 auto builder = ::tensorflow::NodeBuilder(unique_name, "ExtractJpegShape")
591 .Input(_contents)
592 .Attr("output_type", attrs.output_type_)
593 ;
594 scope.UpdateBuilder(&builder);
595 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
596 if (!scope.ok()) return;
597 scope.UpdateStatus(scope.DoShapeInference(ret));
598 this->operation = Operation(ret);
599 this->image_shape = Output(ret, 0);
600}
601
602ExtractJpegShape::ExtractJpegShape(const ::tensorflow::Scope& scope,
603 ::tensorflow::Input contents)
604 : ExtractJpegShape(scope, contents, ExtractJpegShape::Attrs()) {}
605
606HSVToRGB::HSVToRGB(const ::tensorflow::Scope& scope, ::tensorflow::Input
607 images) {
608 if (!scope.ok()) return;
609 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
610 if (!scope.ok()) return;
611 ::tensorflow::Node* ret;
612 const auto unique_name = scope.GetUniqueNameForOp("HSVToRGB");
613 auto builder = ::tensorflow::NodeBuilder(unique_name, "HSVToRGB")
614 .Input(_images)
615 ;
616 scope.UpdateBuilder(&builder);
617 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
618 if (!scope.ok()) return;
619 scope.UpdateStatus(scope.DoShapeInference(ret));
620 this->operation = Operation(ret);
621 this->output = Output(ret, 0);
622}
623
624NonMaxSuppression::NonMaxSuppression(const ::tensorflow::Scope& scope,
625 ::tensorflow::Input boxes,
626 ::tensorflow::Input scores,
627 ::tensorflow::Input max_output_size, const
628 NonMaxSuppression::Attrs& attrs) {
629 if (!scope.ok()) return;
630 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
631 if (!scope.ok()) return;
632 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
633 if (!scope.ok()) return;
634 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
635 if (!scope.ok()) return;
636 ::tensorflow::Node* ret;
637 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppression");
638 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppression")
639 .Input(_boxes)
640 .Input(_scores)
641 .Input(_max_output_size)
642 .Attr("iou_threshold", attrs.iou_threshold_)
643 ;
644 scope.UpdateBuilder(&builder);
645 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
646 if (!scope.ok()) return;
647 scope.UpdateStatus(scope.DoShapeInference(ret));
648 this->operation = Operation(ret);
649 this->selected_indices = Output(ret, 0);
650}
651
652NonMaxSuppression::NonMaxSuppression(const ::tensorflow::Scope& scope,
653 ::tensorflow::Input boxes,
654 ::tensorflow::Input scores,
655 ::tensorflow::Input max_output_size)
656 : NonMaxSuppression(scope, boxes, scores, max_output_size, NonMaxSuppression::Attrs()) {}
657
658NonMaxSuppressionV2::NonMaxSuppressionV2(const ::tensorflow::Scope& scope,
659 ::tensorflow::Input boxes,
660 ::tensorflow::Input scores,
661 ::tensorflow::Input max_output_size,
662 ::tensorflow::Input iou_threshold) {
663 if (!scope.ok()) return;
664 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
665 if (!scope.ok()) return;
666 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
667 if (!scope.ok()) return;
668 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
669 if (!scope.ok()) return;
670 auto _iou_threshold = ::tensorflow::ops::AsNodeOut(scope, iou_threshold);
671 if (!scope.ok()) return;
672 ::tensorflow::Node* ret;
673 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppressionV2");
674 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppressionV2")
675 .Input(_boxes)
676 .Input(_scores)
677 .Input(_max_output_size)
678 .Input(_iou_threshold)
679 ;
680 scope.UpdateBuilder(&builder);
681 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
682 if (!scope.ok()) return;
683 scope.UpdateStatus(scope.DoShapeInference(ret));
684 this->operation = Operation(ret);
685 this->selected_indices = Output(ret, 0);
686}
687
688NonMaxSuppressionV3::NonMaxSuppressionV3(const ::tensorflow::Scope& scope,
689 ::tensorflow::Input boxes,
690 ::tensorflow::Input scores,
691 ::tensorflow::Input max_output_size,
692 ::tensorflow::Input iou_threshold,
693 ::tensorflow::Input score_threshold) {
694 if (!scope.ok()) return;
695 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
696 if (!scope.ok()) return;
697 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
698 if (!scope.ok()) return;
699 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
700 if (!scope.ok()) return;
701 auto _iou_threshold = ::tensorflow::ops::AsNodeOut(scope, iou_threshold);
702 if (!scope.ok()) return;
703 auto _score_threshold = ::tensorflow::ops::AsNodeOut(scope, score_threshold);
704 if (!scope.ok()) return;
705 ::tensorflow::Node* ret;
706 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppressionV3");
707 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppressionV3")
708 .Input(_boxes)
709 .Input(_scores)
710 .Input(_max_output_size)
711 .Input(_iou_threshold)
712 .Input(_score_threshold)
713 ;
714 scope.UpdateBuilder(&builder);
715 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
716 if (!scope.ok()) return;
717 scope.UpdateStatus(scope.DoShapeInference(ret));
718 this->operation = Operation(ret);
719 this->selected_indices = Output(ret, 0);
720}
721
722NonMaxSuppressionV4::NonMaxSuppressionV4(const ::tensorflow::Scope& scope,
723 ::tensorflow::Input boxes,
724 ::tensorflow::Input scores,
725 ::tensorflow::Input max_output_size,
726 ::tensorflow::Input iou_threshold,
727 ::tensorflow::Input score_threshold,
728 const NonMaxSuppressionV4::Attrs&
729 attrs) {
730 if (!scope.ok()) return;
731 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
732 if (!scope.ok()) return;
733 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
734 if (!scope.ok()) return;
735 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
736 if (!scope.ok()) return;
737 auto _iou_threshold = ::tensorflow::ops::AsNodeOut(scope, iou_threshold);
738 if (!scope.ok()) return;
739 auto _score_threshold = ::tensorflow::ops::AsNodeOut(scope, score_threshold);
740 if (!scope.ok()) return;
741 ::tensorflow::Node* ret;
742 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppressionV4");
743 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppressionV4")
744 .Input(_boxes)
745 .Input(_scores)
746 .Input(_max_output_size)
747 .Input(_iou_threshold)
748 .Input(_score_threshold)
749 .Attr("pad_to_max_output_size", attrs.pad_to_max_output_size_)
750 ;
751 scope.UpdateBuilder(&builder);
752 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
753 if (!scope.ok()) return;
754 scope.UpdateStatus(scope.DoShapeInference(ret));
755 this->operation = Operation(ret);
756 ::tensorflow::NameRangeMap _outputs_range;
757 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
758 if (!_status_.ok()) {
759 scope.UpdateStatus(_status_);
760 return;
761 }
762
763 this->selected_indices = Output(ret, _outputs_range["selected_indices"].first);
764 this->valid_outputs = Output(ret, _outputs_range["valid_outputs"].first);
765}
766
767NonMaxSuppressionV4::NonMaxSuppressionV4(const ::tensorflow::Scope& scope,
768 ::tensorflow::Input boxes,
769 ::tensorflow::Input scores,
770 ::tensorflow::Input max_output_size,
771 ::tensorflow::Input iou_threshold,
772 ::tensorflow::Input score_threshold)
773 : NonMaxSuppressionV4(scope, boxes, scores, max_output_size, iou_threshold, score_threshold, NonMaxSuppressionV4::Attrs()) {}
774
775NonMaxSuppressionV5::NonMaxSuppressionV5(const ::tensorflow::Scope& scope,
776 ::tensorflow::Input boxes,
777 ::tensorflow::Input scores,
778 ::tensorflow::Input max_output_size,
779 ::tensorflow::Input iou_threshold,
780 ::tensorflow::Input score_threshold,
781 ::tensorflow::Input soft_nms_sigma,
782 const NonMaxSuppressionV5::Attrs&
783 attrs) {
784 if (!scope.ok()) return;
785 auto _boxes = ::tensorflow::ops::AsNodeOut(scope, boxes);
786 if (!scope.ok()) return;
787 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
788 if (!scope.ok()) return;
789 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
790 if (!scope.ok()) return;
791 auto _iou_threshold = ::tensorflow::ops::AsNodeOut(scope, iou_threshold);
792 if (!scope.ok()) return;
793 auto _score_threshold = ::tensorflow::ops::AsNodeOut(scope, score_threshold);
794 if (!scope.ok()) return;
795 auto _soft_nms_sigma = ::tensorflow::ops::AsNodeOut(scope, soft_nms_sigma);
796 if (!scope.ok()) return;
797 ::tensorflow::Node* ret;
798 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppressionV5");
799 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppressionV5")
800 .Input(_boxes)
801 .Input(_scores)
802 .Input(_max_output_size)
803 .Input(_iou_threshold)
804 .Input(_score_threshold)
805 .Input(_soft_nms_sigma)
806 .Attr("pad_to_max_output_size", attrs.pad_to_max_output_size_)
807 ;
808 scope.UpdateBuilder(&builder);
809 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
810 if (!scope.ok()) return;
811 scope.UpdateStatus(scope.DoShapeInference(ret));
812 this->operation = Operation(ret);
813 ::tensorflow::NameRangeMap _outputs_range;
814 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
815 if (!_status_.ok()) {
816 scope.UpdateStatus(_status_);
817 return;
818 }
819
820 this->selected_indices = Output(ret, _outputs_range["selected_indices"].first);
821 this->selected_scores = Output(ret, _outputs_range["selected_scores"].first);
822 this->valid_outputs = Output(ret, _outputs_range["valid_outputs"].first);
823}
824
825NonMaxSuppressionV5::NonMaxSuppressionV5(const ::tensorflow::Scope& scope,
826 ::tensorflow::Input boxes,
827 ::tensorflow::Input scores,
828 ::tensorflow::Input max_output_size,
829 ::tensorflow::Input iou_threshold,
830 ::tensorflow::Input score_threshold,
831 ::tensorflow::Input soft_nms_sigma)
832 : NonMaxSuppressionV5(scope, boxes, scores, max_output_size, iou_threshold, score_threshold, soft_nms_sigma, NonMaxSuppressionV5::Attrs()) {}
833
834NonMaxSuppressionWithOverlaps::NonMaxSuppressionWithOverlaps(const
835 ::tensorflow::Scope&
836 scope,
837 ::tensorflow::Input
838 overlaps,
839 ::tensorflow::Input
840 scores,
841 ::tensorflow::Input
842 max_output_size,
843 ::tensorflow::Input
844 overlap_threshold,
845 ::tensorflow::Input
846 score_threshold) {
847 if (!scope.ok()) return;
848 auto _overlaps = ::tensorflow::ops::AsNodeOut(scope, overlaps);
849 if (!scope.ok()) return;
850 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
851 if (!scope.ok()) return;
852 auto _max_output_size = ::tensorflow::ops::AsNodeOut(scope, max_output_size);
853 if (!scope.ok()) return;
854 auto _overlap_threshold = ::tensorflow::ops::AsNodeOut(scope, overlap_threshold);
855 if (!scope.ok()) return;
856 auto _score_threshold = ::tensorflow::ops::AsNodeOut(scope, score_threshold);
857 if (!scope.ok()) return;
858 ::tensorflow::Node* ret;
859 const auto unique_name = scope.GetUniqueNameForOp("NonMaxSuppressionWithOverlaps");
860 auto builder = ::tensorflow::NodeBuilder(unique_name, "NonMaxSuppressionWithOverlaps")
861 .Input(_overlaps)
862 .Input(_scores)
863 .Input(_max_output_size)
864 .Input(_overlap_threshold)
865 .Input(_score_threshold)
866 ;
867 scope.UpdateBuilder(&builder);
868 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
869 if (!scope.ok()) return;
870 scope.UpdateStatus(scope.DoShapeInference(ret));
871 this->operation = Operation(ret);
872 this->selected_indices = Output(ret, 0);
873}
874
875QuantizedResizeBilinear::QuantizedResizeBilinear(const ::tensorflow::Scope&
876 scope, ::tensorflow::Input
877 images, ::tensorflow::Input
878 size, ::tensorflow::Input min,
879 ::tensorflow::Input max, const
880 QuantizedResizeBilinear::Attrs&
881 attrs) {
882 if (!scope.ok()) return;
883 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
884 if (!scope.ok()) return;
885 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
886 if (!scope.ok()) return;
887 auto _min = ::tensorflow::ops::AsNodeOut(scope, min);
888 if (!scope.ok()) return;
889 auto _max = ::tensorflow::ops::AsNodeOut(scope, max);
890 if (!scope.ok()) return;
891 ::tensorflow::Node* ret;
892 const auto unique_name = scope.GetUniqueNameForOp("QuantizedResizeBilinear");
893 auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedResizeBilinear")
894 .Input(_images)
895 .Input(_size)
896 .Input(_min)
897 .Input(_max)
898 .Attr("align_corners", attrs.align_corners_)
899 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
900 ;
901 scope.UpdateBuilder(&builder);
902 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
903 if (!scope.ok()) return;
904 scope.UpdateStatus(scope.DoShapeInference(ret));
905 this->operation = Operation(ret);
906 ::tensorflow::NameRangeMap _outputs_range;
907 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
908 if (!_status_.ok()) {
909 scope.UpdateStatus(_status_);
910 return;
911 }
912
913 this->resized_images = Output(ret, _outputs_range["resized_images"].first);
914 this->out_min = Output(ret, _outputs_range["out_min"].first);
915 this->out_max = Output(ret, _outputs_range["out_max"].first);
916}
917
918QuantizedResizeBilinear::QuantizedResizeBilinear(const ::tensorflow::Scope&
919 scope, ::tensorflow::Input
920 images, ::tensorflow::Input
921 size, ::tensorflow::Input min,
922 ::tensorflow::Input max)
923 : QuantizedResizeBilinear(scope, images, size, min, max, QuantizedResizeBilinear::Attrs()) {}
924
925RGBToHSV::RGBToHSV(const ::tensorflow::Scope& scope, ::tensorflow::Input
926 images) {
927 if (!scope.ok()) return;
928 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
929 if (!scope.ok()) return;
930 ::tensorflow::Node* ret;
931 const auto unique_name = scope.GetUniqueNameForOp("RGBToHSV");
932 auto builder = ::tensorflow::NodeBuilder(unique_name, "RGBToHSV")
933 .Input(_images)
934 ;
935 scope.UpdateBuilder(&builder);
936 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
937 if (!scope.ok()) return;
938 scope.UpdateStatus(scope.DoShapeInference(ret));
939 this->operation = Operation(ret);
940 this->output = Output(ret, 0);
941}
942
943ResizeArea::ResizeArea(const ::tensorflow::Scope& scope, ::tensorflow::Input
944 images, ::tensorflow::Input size, const
945 ResizeArea::Attrs& attrs) {
946 if (!scope.ok()) return;
947 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
948 if (!scope.ok()) return;
949 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
950 if (!scope.ok()) return;
951 ::tensorflow::Node* ret;
952 const auto unique_name = scope.GetUniqueNameForOp("ResizeArea");
953 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeArea")
954 .Input(_images)
955 .Input(_size)
956 .Attr("align_corners", attrs.align_corners_)
957 ;
958 scope.UpdateBuilder(&builder);
959 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
960 if (!scope.ok()) return;
961 scope.UpdateStatus(scope.DoShapeInference(ret));
962 this->operation = Operation(ret);
963 this->resized_images = Output(ret, 0);
964}
965
966ResizeArea::ResizeArea(const ::tensorflow::Scope& scope, ::tensorflow::Input
967 images, ::tensorflow::Input size)
968 : ResizeArea(scope, images, size, ResizeArea::Attrs()) {}
969
970ResizeBicubic::ResizeBicubic(const ::tensorflow::Scope& scope,
971 ::tensorflow::Input images, ::tensorflow::Input
972 size, const ResizeBicubic::Attrs& attrs) {
973 if (!scope.ok()) return;
974 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
975 if (!scope.ok()) return;
976 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
977 if (!scope.ok()) return;
978 ::tensorflow::Node* ret;
979 const auto unique_name = scope.GetUniqueNameForOp("ResizeBicubic");
980 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeBicubic")
981 .Input(_images)
982 .Input(_size)
983 .Attr("align_corners", attrs.align_corners_)
984 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
985 ;
986 scope.UpdateBuilder(&builder);
987 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
988 if (!scope.ok()) return;
989 scope.UpdateStatus(scope.DoShapeInference(ret));
990 this->operation = Operation(ret);
991 this->resized_images = Output(ret, 0);
992}
993
994ResizeBicubic::ResizeBicubic(const ::tensorflow::Scope& scope,
995 ::tensorflow::Input images, ::tensorflow::Input
996 size)
997 : ResizeBicubic(scope, images, size, ResizeBicubic::Attrs()) {}
998
999ResizeBilinear::ResizeBilinear(const ::tensorflow::Scope& scope,
1000 ::tensorflow::Input images, ::tensorflow::Input
1001 size, const ResizeBilinear::Attrs& attrs) {
1002 if (!scope.ok()) return;
1003 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
1004 if (!scope.ok()) return;
1005 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
1006 if (!scope.ok()) return;
1007 ::tensorflow::Node* ret;
1008 const auto unique_name = scope.GetUniqueNameForOp("ResizeBilinear");
1009 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeBilinear")
1010 .Input(_images)
1011 .Input(_size)
1012 .Attr("align_corners", attrs.align_corners_)
1013 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
1014 ;
1015 scope.UpdateBuilder(&builder);
1016 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1017 if (!scope.ok()) return;
1018 scope.UpdateStatus(scope.DoShapeInference(ret));
1019 this->operation = Operation(ret);
1020 this->resized_images = Output(ret, 0);
1021}
1022
1023ResizeBilinear::ResizeBilinear(const ::tensorflow::Scope& scope,
1024 ::tensorflow::Input images, ::tensorflow::Input
1025 size)
1026 : ResizeBilinear(scope, images, size, ResizeBilinear::Attrs()) {}
1027
1028ResizeNearestNeighbor::ResizeNearestNeighbor(const ::tensorflow::Scope& scope,
1029 ::tensorflow::Input images,
1030 ::tensorflow::Input size, const
1031 ResizeNearestNeighbor::Attrs&
1032 attrs) {
1033 if (!scope.ok()) return;
1034 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
1035 if (!scope.ok()) return;
1036 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
1037 if (!scope.ok()) return;
1038 ::tensorflow::Node* ret;
1039 const auto unique_name = scope.GetUniqueNameForOp("ResizeNearestNeighbor");
1040 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeNearestNeighbor")
1041 .Input(_images)
1042 .Input(_size)
1043 .Attr("align_corners", attrs.align_corners_)
1044 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
1045 ;
1046 scope.UpdateBuilder(&builder);
1047 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1048 if (!scope.ok()) return;
1049 scope.UpdateStatus(scope.DoShapeInference(ret));
1050 this->operation = Operation(ret);
1051 this->resized_images = Output(ret, 0);
1052}
1053
1054ResizeNearestNeighbor::ResizeNearestNeighbor(const ::tensorflow::Scope& scope,
1055 ::tensorflow::Input images,
1056 ::tensorflow::Input size)
1057 : ResizeNearestNeighbor(scope, images, size, ResizeNearestNeighbor::Attrs()) {}
1058
1059SampleDistortedBoundingBox::SampleDistortedBoundingBox(const
1060 ::tensorflow::Scope&
1061 scope,
1062 ::tensorflow::Input
1063 image_size,
1064 ::tensorflow::Input
1065 bounding_boxes, const
1066 SampleDistortedBoundingBox::Attrs&
1067 attrs) {
1068 if (!scope.ok()) return;
1069 auto _image_size = ::tensorflow::ops::AsNodeOut(scope, image_size);
1070 if (!scope.ok()) return;
1071 auto _bounding_boxes = ::tensorflow::ops::AsNodeOut(scope, bounding_boxes);
1072 if (!scope.ok()) return;
1073 ::tensorflow::Node* ret;
1074 const auto unique_name = scope.GetUniqueNameForOp("SampleDistortedBoundingBox");
1075 auto builder = ::tensorflow::NodeBuilder(unique_name, "SampleDistortedBoundingBox")
1076 .Input(_image_size)
1077 .Input(_bounding_boxes)
1078 .Attr("seed", attrs.seed_)
1079 .Attr("seed2", attrs.seed2_)
1080 .Attr("min_object_covered", attrs.min_object_covered_)
1081 .Attr("aspect_ratio_range", attrs.aspect_ratio_range_)
1082 .Attr("area_range", attrs.area_range_)
1083 .Attr("max_attempts", attrs.max_attempts_)
1084 .Attr("use_image_if_no_bounding_boxes", attrs.use_image_if_no_bounding_boxes_)
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 ::tensorflow::NameRangeMap _outputs_range;
1092 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1093 if (!_status_.ok()) {
1094 scope.UpdateStatus(_status_);
1095 return;
1096 }
1097
1098 this->begin = Output(ret, _outputs_range["begin"].first);
1099 this->size = Output(ret, _outputs_range["size"].first);
1100 this->bboxes = Output(ret, _outputs_range["bboxes"].first);
1101}
1102
1103SampleDistortedBoundingBox::SampleDistortedBoundingBox(const
1104 ::tensorflow::Scope&
1105 scope,
1106 ::tensorflow::Input
1107 image_size,
1108 ::tensorflow::Input
1109 bounding_boxes)
1110 : SampleDistortedBoundingBox(scope, image_size, bounding_boxes, SampleDistortedBoundingBox::Attrs()) {}
1111
1112SampleDistortedBoundingBoxV2::SampleDistortedBoundingBoxV2(const
1113 ::tensorflow::Scope&
1114 scope,
1115 ::tensorflow::Input
1116 image_size,
1117 ::tensorflow::Input
1118 bounding_boxes,
1119 ::tensorflow::Input
1120 min_object_covered,
1121 const
1122 SampleDistortedBoundingBoxV2::Attrs&
1123 attrs) {
1124 if (!scope.ok()) return;
1125 auto _image_size = ::tensorflow::ops::AsNodeOut(scope, image_size);
1126 if (!scope.ok()) return;
1127 auto _bounding_boxes = ::tensorflow::ops::AsNodeOut(scope, bounding_boxes);
1128 if (!scope.ok()) return;
1129 auto _min_object_covered = ::tensorflow::ops::AsNodeOut(scope, min_object_covered);
1130 if (!scope.ok()) return;
1131 ::tensorflow::Node* ret;
1132 const auto unique_name = scope.GetUniqueNameForOp("SampleDistortedBoundingBoxV2");
1133 auto builder = ::tensorflow::NodeBuilder(unique_name, "SampleDistortedBoundingBoxV2")
1134 .Input(_image_size)
1135 .Input(_bounding_boxes)
1136 .Input(_min_object_covered)
1137 .Attr("seed", attrs.seed_)
1138 .Attr("seed2", attrs.seed2_)
1139 .Attr("aspect_ratio_range", attrs.aspect_ratio_range_)
1140 .Attr("area_range", attrs.area_range_)
1141 .Attr("max_attempts", attrs.max_attempts_)
1142 .Attr("use_image_if_no_bounding_boxes", attrs.use_image_if_no_bounding_boxes_)
1143 ;
1144 scope.UpdateBuilder(&builder);
1145 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1146 if (!scope.ok()) return;
1147 scope.UpdateStatus(scope.DoShapeInference(ret));
1148 this->operation = Operation(ret);
1149 ::tensorflow::NameRangeMap _outputs_range;
1150 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1151 if (!_status_.ok()) {
1152 scope.UpdateStatus(_status_);
1153 return;
1154 }
1155
1156 this->begin = Output(ret, _outputs_range["begin"].first);
1157 this->size = Output(ret, _outputs_range["size"].first);
1158 this->bboxes = Output(ret, _outputs_range["bboxes"].first);
1159}
1160
1161SampleDistortedBoundingBoxV2::SampleDistortedBoundingBoxV2(const
1162 ::tensorflow::Scope&
1163 scope,
1164 ::tensorflow::Input
1165 image_size,
1166 ::tensorflow::Input
1167 bounding_boxes,
1168 ::tensorflow::Input
1169 min_object_covered)
1170 : SampleDistortedBoundingBoxV2(scope, image_size, bounding_boxes, min_object_covered, SampleDistortedBoundingBoxV2::Attrs()) {}
1171
1172ScaleAndTranslate::ScaleAndTranslate(const ::tensorflow::Scope& scope,
1173 ::tensorflow::Input images,
1174 ::tensorflow::Input size,
1175 ::tensorflow::Input scale,
1176 ::tensorflow::Input translation, const
1177 ScaleAndTranslate::Attrs& attrs) {
1178 if (!scope.ok()) return;
1179 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
1180 if (!scope.ok()) return;
1181 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
1182 if (!scope.ok()) return;
1183 auto _scale = ::tensorflow::ops::AsNodeOut(scope, scale);
1184 if (!scope.ok()) return;
1185 auto _translation = ::tensorflow::ops::AsNodeOut(scope, translation);
1186 if (!scope.ok()) return;
1187 ::tensorflow::Node* ret;
1188 const auto unique_name = scope.GetUniqueNameForOp("ScaleAndTranslate");
1189 auto builder = ::tensorflow::NodeBuilder(unique_name, "ScaleAndTranslate")
1190 .Input(_images)
1191 .Input(_size)
1192 .Input(_scale)
1193 .Input(_translation)
1194 .Attr("kernel_type", attrs.kernel_type_)
1195 .Attr("antialias", attrs.antialias_)
1196 ;
1197 scope.UpdateBuilder(&builder);
1198 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1199 if (!scope.ok()) return;
1200 scope.UpdateStatus(scope.DoShapeInference(ret));
1201 this->operation = Operation(ret);
1202 this->resized_images = Output(ret, 0);
1203}
1204
1205ScaleAndTranslate::ScaleAndTranslate(const ::tensorflow::Scope& scope,
1206 ::tensorflow::Input images,
1207 ::tensorflow::Input size,
1208 ::tensorflow::Input scale,
1209 ::tensorflow::Input translation)
1210 : ScaleAndTranslate(scope, images, size, scale, translation, ScaleAndTranslate::Attrs()) {}
1211
1212StatelessSampleDistortedBoundingBox::StatelessSampleDistortedBoundingBox(const
1213 ::tensorflow::Scope&
1214 scope,
1215 ::tensorflow::Input
1216 image_size,
1217 ::tensorflow::Input
1218 bounding_boxes,
1219 ::tensorflow::Input
1220 min_object_covered,
1221 ::tensorflow::Input
1222 seed,
1223 const
1224 StatelessSampleDistortedBoundingBox::Attrs&
1225 attrs) {
1226 if (!scope.ok()) return;
1227 auto _image_size = ::tensorflow::ops::AsNodeOut(scope, image_size);
1228 if (!scope.ok()) return;
1229 auto _bounding_boxes = ::tensorflow::ops::AsNodeOut(scope, bounding_boxes);
1230 if (!scope.ok()) return;
1231 auto _min_object_covered = ::tensorflow::ops::AsNodeOut(scope, min_object_covered);
1232 if (!scope.ok()) return;
1233 auto _seed = ::tensorflow::ops::AsNodeOut(scope, seed);
1234 if (!scope.ok()) return;
1235 ::tensorflow::Node* ret;
1236 const auto unique_name = scope.GetUniqueNameForOp("StatelessSampleDistortedBoundingBox");
1237 auto builder = ::tensorflow::NodeBuilder(unique_name, "StatelessSampleDistortedBoundingBox")
1238 .Input(_image_size)
1239 .Input(_bounding_boxes)
1240 .Input(_min_object_covered)
1241 .Input(_seed)
1242 .Attr("aspect_ratio_range", attrs.aspect_ratio_range_)
1243 .Attr("area_range", attrs.area_range_)
1244 .Attr("max_attempts", attrs.max_attempts_)
1245 .Attr("use_image_if_no_bounding_boxes", attrs.use_image_if_no_bounding_boxes_)
1246 ;
1247 scope.UpdateBuilder(&builder);
1248 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1249 if (!scope.ok()) return;
1250 scope.UpdateStatus(scope.DoShapeInference(ret));
1251 this->operation = Operation(ret);
1252 ::tensorflow::NameRangeMap _outputs_range;
1253 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1254 if (!_status_.ok()) {
1255 scope.UpdateStatus(_status_);
1256 return;
1257 }
1258
1259 this->begin = Output(ret, _outputs_range["begin"].first);
1260 this->size = Output(ret, _outputs_range["size"].first);
1261 this->bboxes = Output(ret, _outputs_range["bboxes"].first);
1262}
1263
1264StatelessSampleDistortedBoundingBox::StatelessSampleDistortedBoundingBox(const
1265 ::tensorflow::Scope&
1266 scope,
1267 ::tensorflow::Input
1268 image_size,
1269 ::tensorflow::Input
1270 bounding_boxes,
1271 ::tensorflow::Input
1272 min_object_covered,
1273 ::tensorflow::Input
1274 seed)
1275 : StatelessSampleDistortedBoundingBox(scope, image_size, bounding_boxes, min_object_covered, seed, StatelessSampleDistortedBoundingBox::Attrs()) {}
1276
1277/// @}
1278
1279} // namespace ops
1280} // namespace tensorflow
1281