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_internal.h"
6
7namespace tensorflow {
8namespace ops {
9namespace internal {
10// NOTE: This namespace has internal TensorFlow details that
11// are not part of TensorFlow's public API.
12
13ExtractGlimpseV2::ExtractGlimpseV2(const ::tensorflow::Scope& scope,
14 ::tensorflow::Input input,
15 ::tensorflow::Input size,
16 ::tensorflow::Input offsets, const
17 ExtractGlimpseV2::Attrs& attrs) {
18 if (!scope.ok()) return;
19 auto _input = ::tensorflow::ops::AsNodeOut(scope, input);
20 if (!scope.ok()) return;
21 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
22 if (!scope.ok()) return;
23 auto _offsets = ::tensorflow::ops::AsNodeOut(scope, offsets);
24 if (!scope.ok()) return;
25 ::tensorflow::Node* ret;
26 const auto unique_name = scope.GetUniqueNameForOp("ExtractGlimpseV2");
27 auto builder = ::tensorflow::NodeBuilder(unique_name, "ExtractGlimpseV2")
28 .Input(_input)
29 .Input(_size)
30 .Input(_offsets)
31 .Attr("centered", attrs.centered_)
32 .Attr("normalized", attrs.normalized_)
33 .Attr("uniform_noise", attrs.uniform_noise_)
34 .Attr("noise", attrs.noise_)
35 ;
36 scope.UpdateBuilder(&builder);
37 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
38 if (!scope.ok()) return;
39 scope.UpdateStatus(scope.DoShapeInference(ret));
40 this->operation = Operation(ret);
41 this->glimpse = Output(ret, 0);
42}
43
44ExtractGlimpseV2::ExtractGlimpseV2(const ::tensorflow::Scope& scope,
45 ::tensorflow::Input input,
46 ::tensorflow::Input size,
47 ::tensorflow::Input offsets)
48 : ExtractGlimpseV2(scope, input, size, offsets, ExtractGlimpseV2::Attrs()) {}
49
50GenerateBoundingBoxProposals::GenerateBoundingBoxProposals(const
51 ::tensorflow::Scope&
52 scope,
53 ::tensorflow::Input
54 scores,
55 ::tensorflow::Input
56 bbox_deltas,
57 ::tensorflow::Input
58 image_info,
59 ::tensorflow::Input
60 anchors,
61 ::tensorflow::Input
62 nms_threshold,
63 ::tensorflow::Input
64 pre_nms_topn,
65 ::tensorflow::Input
66 min_size, const
67 GenerateBoundingBoxProposals::Attrs&
68 attrs) {
69 if (!scope.ok()) return;
70 auto _scores = ::tensorflow::ops::AsNodeOut(scope, scores);
71 if (!scope.ok()) return;
72 auto _bbox_deltas = ::tensorflow::ops::AsNodeOut(scope, bbox_deltas);
73 if (!scope.ok()) return;
74 auto _image_info = ::tensorflow::ops::AsNodeOut(scope, image_info);
75 if (!scope.ok()) return;
76 auto _anchors = ::tensorflow::ops::AsNodeOut(scope, anchors);
77 if (!scope.ok()) return;
78 auto _nms_threshold = ::tensorflow::ops::AsNodeOut(scope, nms_threshold);
79 if (!scope.ok()) return;
80 auto _pre_nms_topn = ::tensorflow::ops::AsNodeOut(scope, pre_nms_topn);
81 if (!scope.ok()) return;
82 auto _min_size = ::tensorflow::ops::AsNodeOut(scope, min_size);
83 if (!scope.ok()) return;
84 ::tensorflow::Node* ret;
85 const auto unique_name = scope.GetUniqueNameForOp("GenerateBoundingBoxProposals");
86 auto builder = ::tensorflow::NodeBuilder(unique_name, "GenerateBoundingBoxProposals")
87 .Input(_scores)
88 .Input(_bbox_deltas)
89 .Input(_image_info)
90 .Input(_anchors)
91 .Input(_nms_threshold)
92 .Input(_pre_nms_topn)
93 .Input(_min_size)
94 .Attr("post_nms_topn", attrs.post_nms_topn_)
95 ;
96 scope.UpdateBuilder(&builder);
97 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
98 if (!scope.ok()) return;
99 scope.UpdateStatus(scope.DoShapeInference(ret));
100 this->operation = Operation(ret);
101 ::tensorflow::NameRangeMap _outputs_range;
102 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
103 if (!_status_.ok()) {
104 scope.UpdateStatus(_status_);
105 return;
106 }
107
108 this->rois = Output(ret, _outputs_range["rois"].first);
109 this->roi_probabilities = Output(ret, _outputs_range["roi_probabilities"].first);
110}
111
112GenerateBoundingBoxProposals::GenerateBoundingBoxProposals(const
113 ::tensorflow::Scope&
114 scope,
115 ::tensorflow::Input
116 scores,
117 ::tensorflow::Input
118 bbox_deltas,
119 ::tensorflow::Input
120 image_info,
121 ::tensorflow::Input
122 anchors,
123 ::tensorflow::Input
124 nms_threshold,
125 ::tensorflow::Input
126 pre_nms_topn,
127 ::tensorflow::Input
128 min_size)
129 : GenerateBoundingBoxProposals(scope, scores, bbox_deltas, image_info, anchors, nms_threshold, pre_nms_topn, min_size, GenerateBoundingBoxProposals::Attrs()) {}
130
131ImageProjectiveTransformV2::ImageProjectiveTransformV2(const
132 ::tensorflow::Scope&
133 scope,
134 ::tensorflow::Input
135 images,
136 ::tensorflow::Input
137 transforms,
138 ::tensorflow::Input
139 output_shape,
140 StringPiece
141 interpolation, const
142 ImageProjectiveTransformV2::Attrs&
143 attrs) {
144 if (!scope.ok()) return;
145 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
146 if (!scope.ok()) return;
147 auto _transforms = ::tensorflow::ops::AsNodeOut(scope, transforms);
148 if (!scope.ok()) return;
149 auto _output_shape = ::tensorflow::ops::AsNodeOut(scope, output_shape);
150 if (!scope.ok()) return;
151 ::tensorflow::Node* ret;
152 const auto unique_name = scope.GetUniqueNameForOp("ImageProjectiveTransformV2");
153 auto builder = ::tensorflow::NodeBuilder(unique_name, "ImageProjectiveTransformV2")
154 .Input(_images)
155 .Input(_transforms)
156 .Input(_output_shape)
157 .Attr("interpolation", interpolation)
158 .Attr("fill_mode", attrs.fill_mode_)
159 ;
160 scope.UpdateBuilder(&builder);
161 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
162 if (!scope.ok()) return;
163 scope.UpdateStatus(scope.DoShapeInference(ret));
164 this->operation = Operation(ret);
165 this->transformed_images = Output(ret, 0);
166}
167
168ImageProjectiveTransformV2::ImageProjectiveTransformV2(const
169 ::tensorflow::Scope&
170 scope,
171 ::tensorflow::Input
172 images,
173 ::tensorflow::Input
174 transforms,
175 ::tensorflow::Input
176 output_shape,
177 StringPiece
178 interpolation)
179 : ImageProjectiveTransformV2(scope, images, transforms, output_shape, interpolation, ImageProjectiveTransformV2::Attrs()) {}
180
181ImageProjectiveTransformV3::ImageProjectiveTransformV3(const
182 ::tensorflow::Scope&
183 scope,
184 ::tensorflow::Input
185 images,
186 ::tensorflow::Input
187 transforms,
188 ::tensorflow::Input
189 output_shape,
190 ::tensorflow::Input
191 fill_value, StringPiece
192 interpolation, const
193 ImageProjectiveTransformV3::Attrs&
194 attrs) {
195 if (!scope.ok()) return;
196 auto _images = ::tensorflow::ops::AsNodeOut(scope, images);
197 if (!scope.ok()) return;
198 auto _transforms = ::tensorflow::ops::AsNodeOut(scope, transforms);
199 if (!scope.ok()) return;
200 auto _output_shape = ::tensorflow::ops::AsNodeOut(scope, output_shape);
201 if (!scope.ok()) return;
202 auto _fill_value = ::tensorflow::ops::AsNodeOut(scope, fill_value);
203 if (!scope.ok()) return;
204 ::tensorflow::Node* ret;
205 const auto unique_name = scope.GetUniqueNameForOp("ImageProjectiveTransformV3");
206 auto builder = ::tensorflow::NodeBuilder(unique_name, "ImageProjectiveTransformV3")
207 .Input(_images)
208 .Input(_transforms)
209 .Input(_output_shape)
210 .Input(_fill_value)
211 .Attr("interpolation", interpolation)
212 .Attr("fill_mode", attrs.fill_mode_)
213 ;
214 scope.UpdateBuilder(&builder);
215 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
216 if (!scope.ok()) return;
217 scope.UpdateStatus(scope.DoShapeInference(ret));
218 this->operation = Operation(ret);
219 this->transformed_images = Output(ret, 0);
220}
221
222ImageProjectiveTransformV3::ImageProjectiveTransformV3(const
223 ::tensorflow::Scope&
224 scope,
225 ::tensorflow::Input
226 images,
227 ::tensorflow::Input
228 transforms,
229 ::tensorflow::Input
230 output_shape,
231 ::tensorflow::Input
232 fill_value, StringPiece
233 interpolation)
234 : ImageProjectiveTransformV3(scope, images, transforms, output_shape, fill_value, interpolation, ImageProjectiveTransformV3::Attrs()) {}
235
236ResizeBicubicGrad::ResizeBicubicGrad(const ::tensorflow::Scope& scope,
237 ::tensorflow::Input grads,
238 ::tensorflow::Input original_image, const
239 ResizeBicubicGrad::Attrs& attrs) {
240 if (!scope.ok()) return;
241 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
242 if (!scope.ok()) return;
243 auto _original_image = ::tensorflow::ops::AsNodeOut(scope, original_image);
244 if (!scope.ok()) return;
245 ::tensorflow::Node* ret;
246 const auto unique_name = scope.GetUniqueNameForOp("ResizeBicubicGrad");
247 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeBicubicGrad")
248 .Input(_grads)
249 .Input(_original_image)
250 .Attr("align_corners", attrs.align_corners_)
251 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
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
261ResizeBicubicGrad::ResizeBicubicGrad(const ::tensorflow::Scope& scope,
262 ::tensorflow::Input grads,
263 ::tensorflow::Input original_image)
264 : ResizeBicubicGrad(scope, grads, original_image, ResizeBicubicGrad::Attrs()) {}
265
266ResizeBilinearGrad::ResizeBilinearGrad(const ::tensorflow::Scope& scope,
267 ::tensorflow::Input grads,
268 ::tensorflow::Input original_image,
269 const ResizeBilinearGrad::Attrs& attrs) {
270 if (!scope.ok()) return;
271 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
272 if (!scope.ok()) return;
273 auto _original_image = ::tensorflow::ops::AsNodeOut(scope, original_image);
274 if (!scope.ok()) return;
275 ::tensorflow::Node* ret;
276 const auto unique_name = scope.GetUniqueNameForOp("ResizeBilinearGrad");
277 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeBilinearGrad")
278 .Input(_grads)
279 .Input(_original_image)
280 .Attr("align_corners", attrs.align_corners_)
281 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
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
291ResizeBilinearGrad::ResizeBilinearGrad(const ::tensorflow::Scope& scope,
292 ::tensorflow::Input grads,
293 ::tensorflow::Input original_image)
294 : ResizeBilinearGrad(scope, grads, original_image, ResizeBilinearGrad::Attrs()) {}
295
296ResizeNearestNeighborGrad::ResizeNearestNeighborGrad(const ::tensorflow::Scope&
297 scope, ::tensorflow::Input
298 grads, ::tensorflow::Input
299 size, const
300 ResizeNearestNeighborGrad::Attrs&
301 attrs) {
302 if (!scope.ok()) return;
303 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
304 if (!scope.ok()) return;
305 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
306 if (!scope.ok()) return;
307 ::tensorflow::Node* ret;
308 const auto unique_name = scope.GetUniqueNameForOp("ResizeNearestNeighborGrad");
309 auto builder = ::tensorflow::NodeBuilder(unique_name, "ResizeNearestNeighborGrad")
310 .Input(_grads)
311 .Input(_size)
312 .Attr("align_corners", attrs.align_corners_)
313 .Attr("half_pixel_centers", attrs.half_pixel_centers_)
314 ;
315 scope.UpdateBuilder(&builder);
316 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
317 if (!scope.ok()) return;
318 scope.UpdateStatus(scope.DoShapeInference(ret));
319 this->operation = Operation(ret);
320 this->output = Output(ret, 0);
321}
322
323ResizeNearestNeighborGrad::ResizeNearestNeighborGrad(const ::tensorflow::Scope&
324 scope, ::tensorflow::Input
325 grads, ::tensorflow::Input
326 size)
327 : ResizeNearestNeighborGrad(scope, grads, size, ResizeNearestNeighborGrad::Attrs()) {}
328
329ScaleAndTranslateGrad::ScaleAndTranslateGrad(const ::tensorflow::Scope& scope,
330 ::tensorflow::Input grads,
331 ::tensorflow::Input
332 original_image,
333 ::tensorflow::Input scale,
334 ::tensorflow::Input translation,
335 const
336 ScaleAndTranslateGrad::Attrs&
337 attrs) {
338 if (!scope.ok()) return;
339 auto _grads = ::tensorflow::ops::AsNodeOut(scope, grads);
340 if (!scope.ok()) return;
341 auto _original_image = ::tensorflow::ops::AsNodeOut(scope, original_image);
342 if (!scope.ok()) return;
343 auto _scale = ::tensorflow::ops::AsNodeOut(scope, scale);
344 if (!scope.ok()) return;
345 auto _translation = ::tensorflow::ops::AsNodeOut(scope, translation);
346 if (!scope.ok()) return;
347 ::tensorflow::Node* ret;
348 const auto unique_name = scope.GetUniqueNameForOp("ScaleAndTranslateGrad");
349 auto builder = ::tensorflow::NodeBuilder(unique_name, "ScaleAndTranslateGrad")
350 .Input(_grads)
351 .Input(_original_image)
352 .Input(_scale)
353 .Input(_translation)
354 .Attr("kernel_type", attrs.kernel_type_)
355 .Attr("antialias", attrs.antialias_)
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->output = Output(ret, 0);
363}
364
365ScaleAndTranslateGrad::ScaleAndTranslateGrad(const ::tensorflow::Scope& scope,
366 ::tensorflow::Input grads,
367 ::tensorflow::Input
368 original_image,
369 ::tensorflow::Input scale,
370 ::tensorflow::Input translation)
371 : ScaleAndTranslateGrad(scope, grads, original_image, scale, translation, ScaleAndTranslateGrad::Attrs()) {}
372
373} // namespace internal
374} // namespace ops
375} // namespace tensorflow
376