1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/nn_ops_internal.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | namespace internal { |
10 | // NOTE: This namespace has internal TensorFlow details that |
11 | // are not part of TensorFlow's public API. |
12 | |
13 | AvgPoolGrad::AvgPoolGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
14 | orig_input_shape, ::tensorflow::Input grad, const |
15 | gtl::ArraySlice<int>& ksize, const |
16 | gtl::ArraySlice<int>& strides, StringPiece padding, |
17 | const AvgPoolGrad::Attrs& attrs) { |
18 | if (!scope.ok()) return; |
19 | auto _orig_input_shape = ::tensorflow::ops::AsNodeOut(scope, orig_input_shape); |
20 | if (!scope.ok()) return; |
21 | auto _grad = ::tensorflow::ops::AsNodeOut(scope, grad); |
22 | if (!scope.ok()) return; |
23 | ::tensorflow::Node* ret; |
24 | const auto unique_name = scope.GetUniqueNameForOp("AvgPoolGrad" ); |
25 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AvgPoolGrad" ) |
26 | .Input(_orig_input_shape) |
27 | .Input(_grad) |
28 | .Attr("ksize" , ksize) |
29 | .Attr("strides" , strides) |
30 | .Attr("padding" , padding) |
31 | .Attr("data_format" , attrs.data_format_) |
32 | ; |
33 | scope.UpdateBuilder(&builder); |
34 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
35 | if (!scope.ok()) return; |
36 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
37 | this->operation = Operation(ret); |
38 | this->output = Output(ret, 0); |
39 | } |
40 | |
41 | AvgPoolGrad::AvgPoolGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
42 | orig_input_shape, ::tensorflow::Input grad, const |
43 | gtl::ArraySlice<int>& ksize, const |
44 | gtl::ArraySlice<int>& strides, StringPiece padding) |
45 | : AvgPoolGrad(scope, orig_input_shape, grad, ksize, strides, padding, AvgPoolGrad::Attrs()) {} |
46 | |
47 | EluGrad::EluGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
48 | gradients, ::tensorflow::Input outputs) { |
49 | if (!scope.ok()) return; |
50 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
51 | if (!scope.ok()) return; |
52 | auto _outputs = ::tensorflow::ops::AsNodeOut(scope, outputs); |
53 | if (!scope.ok()) return; |
54 | ::tensorflow::Node* ret; |
55 | const auto unique_name = scope.GetUniqueNameForOp("EluGrad" ); |
56 | auto builder = ::tensorflow::NodeBuilder(unique_name, "EluGrad" ) |
57 | .Input(_gradients) |
58 | .Input(_outputs) |
59 | ; |
60 | scope.UpdateBuilder(&builder); |
61 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
62 | if (!scope.ok()) return; |
63 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
64 | this->operation = Operation(ret); |
65 | this->backprops = Output(ret, 0); |
66 | } |
67 | |
68 | FractionalAvgPoolGrad::FractionalAvgPoolGrad(const ::tensorflow::Scope& scope, |
69 | ::tensorflow::Input |
70 | orig_input_tensor_shape, |
71 | ::tensorflow::Input out_backprop, |
72 | ::tensorflow::Input |
73 | row_pooling_sequence, |
74 | ::tensorflow::Input |
75 | col_pooling_sequence, const |
76 | FractionalAvgPoolGrad::Attrs& |
77 | attrs) { |
78 | if (!scope.ok()) return; |
79 | auto _orig_input_tensor_shape = ::tensorflow::ops::AsNodeOut(scope, orig_input_tensor_shape); |
80 | if (!scope.ok()) return; |
81 | auto _out_backprop = ::tensorflow::ops::AsNodeOut(scope, out_backprop); |
82 | if (!scope.ok()) return; |
83 | auto _row_pooling_sequence = ::tensorflow::ops::AsNodeOut(scope, row_pooling_sequence); |
84 | if (!scope.ok()) return; |
85 | auto _col_pooling_sequence = ::tensorflow::ops::AsNodeOut(scope, col_pooling_sequence); |
86 | if (!scope.ok()) return; |
87 | ::tensorflow::Node* ret; |
88 | const auto unique_name = scope.GetUniqueNameForOp("FractionalAvgPoolGrad" ); |
89 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FractionalAvgPoolGrad" ) |
90 | .Input(_orig_input_tensor_shape) |
91 | .Input(_out_backprop) |
92 | .Input(_row_pooling_sequence) |
93 | .Input(_col_pooling_sequence) |
94 | .Attr("overlapping" , attrs.overlapping_) |
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 | this->output = Output(ret, 0); |
102 | } |
103 | |
104 | FractionalAvgPoolGrad::FractionalAvgPoolGrad(const ::tensorflow::Scope& scope, |
105 | ::tensorflow::Input |
106 | orig_input_tensor_shape, |
107 | ::tensorflow::Input out_backprop, |
108 | ::tensorflow::Input |
109 | row_pooling_sequence, |
110 | ::tensorflow::Input |
111 | col_pooling_sequence) |
112 | : FractionalAvgPoolGrad(scope, orig_input_tensor_shape, out_backprop, row_pooling_sequence, col_pooling_sequence, FractionalAvgPoolGrad::Attrs()) {} |
113 | |
114 | FractionalMaxPoolGrad::FractionalMaxPoolGrad(const ::tensorflow::Scope& scope, |
115 | ::tensorflow::Input orig_input, |
116 | ::tensorflow::Input orig_output, |
117 | ::tensorflow::Input out_backprop, |
118 | ::tensorflow::Input |
119 | row_pooling_sequence, |
120 | ::tensorflow::Input |
121 | col_pooling_sequence, const |
122 | FractionalMaxPoolGrad::Attrs& |
123 | attrs) { |
124 | if (!scope.ok()) return; |
125 | auto _orig_input = ::tensorflow::ops::AsNodeOut(scope, orig_input); |
126 | if (!scope.ok()) return; |
127 | auto _orig_output = ::tensorflow::ops::AsNodeOut(scope, orig_output); |
128 | if (!scope.ok()) return; |
129 | auto _out_backprop = ::tensorflow::ops::AsNodeOut(scope, out_backprop); |
130 | if (!scope.ok()) return; |
131 | auto _row_pooling_sequence = ::tensorflow::ops::AsNodeOut(scope, row_pooling_sequence); |
132 | if (!scope.ok()) return; |
133 | auto _col_pooling_sequence = ::tensorflow::ops::AsNodeOut(scope, col_pooling_sequence); |
134 | if (!scope.ok()) return; |
135 | ::tensorflow::Node* ret; |
136 | const auto unique_name = scope.GetUniqueNameForOp("FractionalMaxPoolGrad" ); |
137 | auto builder = ::tensorflow::NodeBuilder(unique_name, "FractionalMaxPoolGrad" ) |
138 | .Input(_orig_input) |
139 | .Input(_orig_output) |
140 | .Input(_out_backprop) |
141 | .Input(_row_pooling_sequence) |
142 | .Input(_col_pooling_sequence) |
143 | .Attr("overlapping" , attrs.overlapping_) |
144 | ; |
145 | scope.UpdateBuilder(&builder); |
146 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
147 | if (!scope.ok()) return; |
148 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
149 | this->operation = Operation(ret); |
150 | this->output = Output(ret, 0); |
151 | } |
152 | |
153 | FractionalMaxPoolGrad::FractionalMaxPoolGrad(const ::tensorflow::Scope& scope, |
154 | ::tensorflow::Input orig_input, |
155 | ::tensorflow::Input orig_output, |
156 | ::tensorflow::Input out_backprop, |
157 | ::tensorflow::Input |
158 | row_pooling_sequence, |
159 | ::tensorflow::Input |
160 | col_pooling_sequence) |
161 | : FractionalMaxPoolGrad(scope, orig_input, orig_output, out_backprop, row_pooling_sequence, col_pooling_sequence, FractionalMaxPoolGrad::Attrs()) {} |
162 | |
163 | IsotonicRegression::IsotonicRegression(const ::tensorflow::Scope& scope, |
164 | ::tensorflow::Input input, const |
165 | IsotonicRegression::Attrs& attrs) { |
166 | if (!scope.ok()) return; |
167 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
168 | if (!scope.ok()) return; |
169 | ::tensorflow::Node* ret; |
170 | const auto unique_name = scope.GetUniqueNameForOp("IsotonicRegression" ); |
171 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IsotonicRegression" ) |
172 | .Input(_input) |
173 | .Attr("output_dtype" , attrs.output_dtype_) |
174 | ; |
175 | scope.UpdateBuilder(&builder); |
176 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
177 | if (!scope.ok()) return; |
178 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
179 | this->operation = Operation(ret); |
180 | ::tensorflow::NameRangeMap _outputs_range; |
181 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
182 | if (!_status_.ok()) { |
183 | scope.UpdateStatus(_status_); |
184 | return; |
185 | } |
186 | |
187 | this->output = Output(ret, _outputs_range["output" ].first); |
188 | this->segments = Output(ret, _outputs_range["segments" ].first); |
189 | } |
190 | |
191 | IsotonicRegression::IsotonicRegression(const ::tensorflow::Scope& scope, |
192 | ::tensorflow::Input input) |
193 | : IsotonicRegression(scope, input, IsotonicRegression::Attrs()) {} |
194 | |
195 | LRNGrad::LRNGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
196 | input_grads, ::tensorflow::Input input_image, |
197 | ::tensorflow::Input output_image, const LRNGrad::Attrs& attrs) { |
198 | if (!scope.ok()) return; |
199 | auto _input_grads = ::tensorflow::ops::AsNodeOut(scope, input_grads); |
200 | if (!scope.ok()) return; |
201 | auto _input_image = ::tensorflow::ops::AsNodeOut(scope, input_image); |
202 | if (!scope.ok()) return; |
203 | auto _output_image = ::tensorflow::ops::AsNodeOut(scope, output_image); |
204 | if (!scope.ok()) return; |
205 | ::tensorflow::Node* ret; |
206 | const auto unique_name = scope.GetUniqueNameForOp("LRNGrad" ); |
207 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LRNGrad" ) |
208 | .Input(_input_grads) |
209 | .Input(_input_image) |
210 | .Input(_output_image) |
211 | .Attr("depth_radius" , attrs.depth_radius_) |
212 | .Attr("bias" , attrs.bias_) |
213 | .Attr("alpha" , attrs.alpha_) |
214 | .Attr("beta" , attrs.beta_) |
215 | ; |
216 | scope.UpdateBuilder(&builder); |
217 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
218 | if (!scope.ok()) return; |
219 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
220 | this->operation = Operation(ret); |
221 | this->output = Output(ret, 0); |
222 | } |
223 | |
224 | LRNGrad::LRNGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
225 | input_grads, ::tensorflow::Input input_image, |
226 | ::tensorflow::Input output_image) |
227 | : LRNGrad(scope, input_grads, input_image, output_image, LRNGrad::Attrs()) {} |
228 | |
229 | LeakyRelu::LeakyRelu(const ::tensorflow::Scope& scope, ::tensorflow::Input |
230 | features, const LeakyRelu::Attrs& attrs) { |
231 | if (!scope.ok()) return; |
232 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
233 | if (!scope.ok()) return; |
234 | ::tensorflow::Node* ret; |
235 | const auto unique_name = scope.GetUniqueNameForOp("LeakyRelu" ); |
236 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LeakyRelu" ) |
237 | .Input(_features) |
238 | .Attr("alpha" , attrs.alpha_) |
239 | ; |
240 | scope.UpdateBuilder(&builder); |
241 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
242 | if (!scope.ok()) return; |
243 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
244 | this->operation = Operation(ret); |
245 | this->activations = Output(ret, 0); |
246 | } |
247 | |
248 | LeakyRelu::LeakyRelu(const ::tensorflow::Scope& scope, ::tensorflow::Input |
249 | features) |
250 | : LeakyRelu(scope, features, LeakyRelu::Attrs()) {} |
251 | |
252 | LeakyReluGrad::LeakyReluGrad(const ::tensorflow::Scope& scope, |
253 | ::tensorflow::Input gradients, ::tensorflow::Input |
254 | features, const LeakyReluGrad::Attrs& attrs) { |
255 | if (!scope.ok()) return; |
256 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
257 | if (!scope.ok()) return; |
258 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
259 | if (!scope.ok()) return; |
260 | ::tensorflow::Node* ret; |
261 | const auto unique_name = scope.GetUniqueNameForOp("LeakyReluGrad" ); |
262 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LeakyReluGrad" ) |
263 | .Input(_gradients) |
264 | .Input(_features) |
265 | .Attr("alpha" , attrs.alpha_) |
266 | ; |
267 | scope.UpdateBuilder(&builder); |
268 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
269 | if (!scope.ok()) return; |
270 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
271 | this->operation = Operation(ret); |
272 | this->backprops = Output(ret, 0); |
273 | } |
274 | |
275 | LeakyReluGrad::LeakyReluGrad(const ::tensorflow::Scope& scope, |
276 | ::tensorflow::Input gradients, ::tensorflow::Input |
277 | features) |
278 | : LeakyReluGrad(scope, gradients, features, LeakyReluGrad::Attrs()) {} |
279 | |
280 | MaxPoolGrad::MaxPoolGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
281 | orig_input, ::tensorflow::Input orig_output, |
282 | ::tensorflow::Input grad, const gtl::ArraySlice<int>& |
283 | ksize, const gtl::ArraySlice<int>& strides, |
284 | StringPiece padding, const MaxPoolGrad::Attrs& attrs) { |
285 | if (!scope.ok()) return; |
286 | auto _orig_input = ::tensorflow::ops::AsNodeOut(scope, orig_input); |
287 | if (!scope.ok()) return; |
288 | auto _orig_output = ::tensorflow::ops::AsNodeOut(scope, orig_output); |
289 | if (!scope.ok()) return; |
290 | auto _grad = ::tensorflow::ops::AsNodeOut(scope, grad); |
291 | if (!scope.ok()) return; |
292 | ::tensorflow::Node* ret; |
293 | const auto unique_name = scope.GetUniqueNameForOp("MaxPoolGrad" ); |
294 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MaxPoolGrad" ) |
295 | .Input(_orig_input) |
296 | .Input(_orig_output) |
297 | .Input(_grad) |
298 | .Attr("ksize" , ksize) |
299 | .Attr("strides" , strides) |
300 | .Attr("padding" , padding) |
301 | .Attr("explicit_paddings" , attrs.explicit_paddings_) |
302 | .Attr("data_format" , attrs.data_format_) |
303 | ; |
304 | scope.UpdateBuilder(&builder); |
305 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
306 | if (!scope.ok()) return; |
307 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
308 | this->operation = Operation(ret); |
309 | this->output = Output(ret, 0); |
310 | } |
311 | |
312 | MaxPoolGrad::MaxPoolGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
313 | orig_input, ::tensorflow::Input orig_output, |
314 | ::tensorflow::Input grad, const gtl::ArraySlice<int>& |
315 | ksize, const gtl::ArraySlice<int>& strides, |
316 | StringPiece padding) |
317 | : MaxPoolGrad(scope, orig_input, orig_output, grad, ksize, strides, padding, MaxPoolGrad::Attrs()) {} |
318 | |
319 | MaxPoolGradWithArgmax::MaxPoolGradWithArgmax(const ::tensorflow::Scope& scope, |
320 | ::tensorflow::Input input, |
321 | ::tensorflow::Input grad, |
322 | ::tensorflow::Input argmax, const |
323 | gtl::ArraySlice<int>& ksize, const |
324 | gtl::ArraySlice<int>& strides, |
325 | StringPiece padding, const |
326 | MaxPoolGradWithArgmax::Attrs& |
327 | attrs) { |
328 | if (!scope.ok()) return; |
329 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
330 | if (!scope.ok()) return; |
331 | auto _grad = ::tensorflow::ops::AsNodeOut(scope, grad); |
332 | if (!scope.ok()) return; |
333 | auto _argmax = ::tensorflow::ops::AsNodeOut(scope, argmax); |
334 | if (!scope.ok()) return; |
335 | ::tensorflow::Node* ret; |
336 | const auto unique_name = scope.GetUniqueNameForOp("MaxPoolGradWithArgmax" ); |
337 | auto builder = ::tensorflow::NodeBuilder(unique_name, "MaxPoolGradWithArgmax" ) |
338 | .Input(_input) |
339 | .Input(_grad) |
340 | .Input(_argmax) |
341 | .Attr("ksize" , ksize) |
342 | .Attr("strides" , strides) |
343 | .Attr("padding" , padding) |
344 | .Attr("include_batch_in_index" , attrs.include_batch_in_index_) |
345 | ; |
346 | scope.UpdateBuilder(&builder); |
347 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
348 | if (!scope.ok()) return; |
349 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
350 | this->operation = Operation(ret); |
351 | this->output = Output(ret, 0); |
352 | } |
353 | |
354 | MaxPoolGradWithArgmax::MaxPoolGradWithArgmax(const ::tensorflow::Scope& scope, |
355 | ::tensorflow::Input input, |
356 | ::tensorflow::Input grad, |
357 | ::tensorflow::Input argmax, const |
358 | gtl::ArraySlice<int>& ksize, const |
359 | gtl::ArraySlice<int>& strides, |
360 | StringPiece padding) |
361 | : MaxPoolGradWithArgmax(scope, input, grad, argmax, ksize, strides, padding, MaxPoolGradWithArgmax::Attrs()) {} |
362 | |
363 | QuantizedConv2DAndRelu::QuantizedConv2DAndRelu(const ::tensorflow::Scope& |
364 | scope, ::tensorflow::Input |
365 | input, ::tensorflow::Input |
366 | filter, ::tensorflow::Input |
367 | min_input, ::tensorflow::Input |
368 | max_input, ::tensorflow::Input |
369 | min_filter, ::tensorflow::Input |
370 | max_filter, const |
371 | gtl::ArraySlice<int>& strides, |
372 | StringPiece padding, const |
373 | QuantizedConv2DAndRelu::Attrs& |
374 | attrs) { |
375 | if (!scope.ok()) return; |
376 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
377 | if (!scope.ok()) return; |
378 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
379 | if (!scope.ok()) return; |
380 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
381 | if (!scope.ok()) return; |
382 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
383 | if (!scope.ok()) return; |
384 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
385 | if (!scope.ok()) return; |
386 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
387 | if (!scope.ok()) return; |
388 | ::tensorflow::Node* ret; |
389 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DAndRelu" ); |
390 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DAndRelu" ) |
391 | .Input(_input) |
392 | .Input(_filter) |
393 | .Input(_min_input) |
394 | .Input(_max_input) |
395 | .Input(_min_filter) |
396 | .Input(_max_filter) |
397 | .Attr("out_type" , attrs.out_type_) |
398 | .Attr("strides" , strides) |
399 | .Attr("padding" , padding) |
400 | .Attr("dilations" , attrs.dilations_) |
401 | .Attr("padding_list" , attrs.padding_list_) |
402 | ; |
403 | scope.UpdateBuilder(&builder); |
404 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
405 | if (!scope.ok()) return; |
406 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
407 | this->operation = Operation(ret); |
408 | ::tensorflow::NameRangeMap _outputs_range; |
409 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
410 | if (!_status_.ok()) { |
411 | scope.UpdateStatus(_status_); |
412 | return; |
413 | } |
414 | |
415 | this->output = Output(ret, _outputs_range["output" ].first); |
416 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
417 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
418 | } |
419 | |
420 | QuantizedConv2DAndRelu::QuantizedConv2DAndRelu(const ::tensorflow::Scope& |
421 | scope, ::tensorflow::Input |
422 | input, ::tensorflow::Input |
423 | filter, ::tensorflow::Input |
424 | min_input, ::tensorflow::Input |
425 | max_input, ::tensorflow::Input |
426 | min_filter, ::tensorflow::Input |
427 | max_filter, const |
428 | gtl::ArraySlice<int>& strides, |
429 | StringPiece padding) |
430 | : QuantizedConv2DAndRelu(scope, input, filter, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedConv2DAndRelu::Attrs()) {} |
431 | |
432 | QuantizedConv2DAndReluAndRequantize::QuantizedConv2DAndReluAndRequantize(const |
433 | ::tensorflow::Scope& |
434 | scope, |
435 | ::tensorflow::Input |
436 | input, |
437 | ::tensorflow::Input |
438 | filter, |
439 | ::tensorflow::Input |
440 | min_input, |
441 | ::tensorflow::Input |
442 | max_input, |
443 | ::tensorflow::Input |
444 | min_filter, |
445 | ::tensorflow::Input |
446 | max_filter, |
447 | ::tensorflow::Input |
448 | min_freezed_output, |
449 | ::tensorflow::Input |
450 | max_freezed_output, |
451 | const |
452 | gtl::ArraySlice<int>& |
453 | strides, |
454 | StringPiece |
455 | padding, |
456 | const |
457 | QuantizedConv2DAndReluAndRequantize::Attrs& |
458 | attrs) { |
459 | if (!scope.ok()) return; |
460 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
461 | if (!scope.ok()) return; |
462 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
463 | if (!scope.ok()) return; |
464 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
465 | if (!scope.ok()) return; |
466 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
467 | if (!scope.ok()) return; |
468 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
469 | if (!scope.ok()) return; |
470 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
471 | if (!scope.ok()) return; |
472 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
473 | if (!scope.ok()) return; |
474 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
475 | if (!scope.ok()) return; |
476 | ::tensorflow::Node* ret; |
477 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DAndReluAndRequantize" ); |
478 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DAndReluAndRequantize" ) |
479 | .Input(_input) |
480 | .Input(_filter) |
481 | .Input(_min_input) |
482 | .Input(_max_input) |
483 | .Input(_min_filter) |
484 | .Input(_max_filter) |
485 | .Input(_min_freezed_output) |
486 | .Input(_max_freezed_output) |
487 | .Attr("out_type" , attrs.out_type_) |
488 | .Attr("strides" , strides) |
489 | .Attr("padding" , padding) |
490 | .Attr("dilations" , attrs.dilations_) |
491 | .Attr("padding_list" , attrs.padding_list_) |
492 | ; |
493 | scope.UpdateBuilder(&builder); |
494 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
495 | if (!scope.ok()) return; |
496 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
497 | this->operation = Operation(ret); |
498 | ::tensorflow::NameRangeMap _outputs_range; |
499 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
500 | if (!_status_.ok()) { |
501 | scope.UpdateStatus(_status_); |
502 | return; |
503 | } |
504 | |
505 | this->output = Output(ret, _outputs_range["output" ].first); |
506 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
507 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
508 | } |
509 | |
510 | QuantizedConv2DAndReluAndRequantize::QuantizedConv2DAndReluAndRequantize(const |
511 | ::tensorflow::Scope& |
512 | scope, |
513 | ::tensorflow::Input |
514 | input, |
515 | ::tensorflow::Input |
516 | filter, |
517 | ::tensorflow::Input |
518 | min_input, |
519 | ::tensorflow::Input |
520 | max_input, |
521 | ::tensorflow::Input |
522 | min_filter, |
523 | ::tensorflow::Input |
524 | max_filter, |
525 | ::tensorflow::Input |
526 | min_freezed_output, |
527 | ::tensorflow::Input |
528 | max_freezed_output, |
529 | const |
530 | gtl::ArraySlice<int>& |
531 | strides, |
532 | StringPiece |
533 | padding) |
534 | : QuantizedConv2DAndReluAndRequantize(scope, input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, strides, padding, QuantizedConv2DAndReluAndRequantize::Attrs()) {} |
535 | |
536 | QuantizedConv2DAndRequantize::QuantizedConv2DAndRequantize(const |
537 | ::tensorflow::Scope& |
538 | scope, |
539 | ::tensorflow::Input |
540 | input, |
541 | ::tensorflow::Input |
542 | filter, |
543 | ::tensorflow::Input |
544 | min_input, |
545 | ::tensorflow::Input |
546 | max_input, |
547 | ::tensorflow::Input |
548 | min_filter, |
549 | ::tensorflow::Input |
550 | max_filter, |
551 | ::tensorflow::Input |
552 | min_freezed_output, |
553 | ::tensorflow::Input |
554 | max_freezed_output, |
555 | const |
556 | gtl::ArraySlice<int>& |
557 | strides, StringPiece |
558 | padding, const |
559 | QuantizedConv2DAndRequantize::Attrs& |
560 | attrs) { |
561 | if (!scope.ok()) return; |
562 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
563 | if (!scope.ok()) return; |
564 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
565 | if (!scope.ok()) return; |
566 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
567 | if (!scope.ok()) return; |
568 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
569 | if (!scope.ok()) return; |
570 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
571 | if (!scope.ok()) return; |
572 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
573 | if (!scope.ok()) return; |
574 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
575 | if (!scope.ok()) return; |
576 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
577 | if (!scope.ok()) return; |
578 | ::tensorflow::Node* ret; |
579 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DAndRequantize" ); |
580 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DAndRequantize" ) |
581 | .Input(_input) |
582 | .Input(_filter) |
583 | .Input(_min_input) |
584 | .Input(_max_input) |
585 | .Input(_min_filter) |
586 | .Input(_max_filter) |
587 | .Input(_min_freezed_output) |
588 | .Input(_max_freezed_output) |
589 | .Attr("out_type" , attrs.out_type_) |
590 | .Attr("strides" , strides) |
591 | .Attr("padding" , padding) |
592 | .Attr("dilations" , attrs.dilations_) |
593 | .Attr("padding_list" , attrs.padding_list_) |
594 | ; |
595 | scope.UpdateBuilder(&builder); |
596 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
597 | if (!scope.ok()) return; |
598 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
599 | this->operation = Operation(ret); |
600 | ::tensorflow::NameRangeMap _outputs_range; |
601 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
602 | if (!_status_.ok()) { |
603 | scope.UpdateStatus(_status_); |
604 | return; |
605 | } |
606 | |
607 | this->output = Output(ret, _outputs_range["output" ].first); |
608 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
609 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
610 | } |
611 | |
612 | QuantizedConv2DAndRequantize::QuantizedConv2DAndRequantize(const |
613 | ::tensorflow::Scope& |
614 | scope, |
615 | ::tensorflow::Input |
616 | input, |
617 | ::tensorflow::Input |
618 | filter, |
619 | ::tensorflow::Input |
620 | min_input, |
621 | ::tensorflow::Input |
622 | max_input, |
623 | ::tensorflow::Input |
624 | min_filter, |
625 | ::tensorflow::Input |
626 | max_filter, |
627 | ::tensorflow::Input |
628 | min_freezed_output, |
629 | ::tensorflow::Input |
630 | max_freezed_output, |
631 | const |
632 | gtl::ArraySlice<int>& |
633 | strides, StringPiece |
634 | padding) |
635 | : QuantizedConv2DAndRequantize(scope, input, filter, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, strides, padding, QuantizedConv2DAndRequantize::Attrs()) {} |
636 | |
637 | QuantizedConv2DPerChannel::QuantizedConv2DPerChannel(const ::tensorflow::Scope& |
638 | scope, ::tensorflow::Input |
639 | input, ::tensorflow::Input |
640 | filter, |
641 | ::tensorflow::Input |
642 | min_input, |
643 | ::tensorflow::Input |
644 | max_input, |
645 | ::tensorflow::Input |
646 | min_filter, |
647 | ::tensorflow::Input |
648 | max_filter, const |
649 | gtl::ArraySlice<int>& |
650 | strides, StringPiece |
651 | padding, const |
652 | QuantizedConv2DPerChannel::Attrs& |
653 | attrs) { |
654 | if (!scope.ok()) return; |
655 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
656 | if (!scope.ok()) return; |
657 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
658 | if (!scope.ok()) return; |
659 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
660 | if (!scope.ok()) return; |
661 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
662 | if (!scope.ok()) return; |
663 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
664 | if (!scope.ok()) return; |
665 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
666 | if (!scope.ok()) return; |
667 | ::tensorflow::Node* ret; |
668 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DPerChannel" ); |
669 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DPerChannel" ) |
670 | .Input(_input) |
671 | .Input(_filter) |
672 | .Input(_min_input) |
673 | .Input(_max_input) |
674 | .Input(_min_filter) |
675 | .Input(_max_filter) |
676 | .Attr("out_type" , attrs.out_type_) |
677 | .Attr("strides" , strides) |
678 | .Attr("padding" , padding) |
679 | .Attr("dilations" , attrs.dilations_) |
680 | ; |
681 | scope.UpdateBuilder(&builder); |
682 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
683 | if (!scope.ok()) return; |
684 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
685 | this->operation = Operation(ret); |
686 | ::tensorflow::NameRangeMap _outputs_range; |
687 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
688 | if (!_status_.ok()) { |
689 | scope.UpdateStatus(_status_); |
690 | return; |
691 | } |
692 | |
693 | this->output = Output(ret, _outputs_range["output" ].first); |
694 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
695 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
696 | } |
697 | |
698 | QuantizedConv2DPerChannel::QuantizedConv2DPerChannel(const ::tensorflow::Scope& |
699 | scope, ::tensorflow::Input |
700 | input, ::tensorflow::Input |
701 | filter, |
702 | ::tensorflow::Input |
703 | min_input, |
704 | ::tensorflow::Input |
705 | max_input, |
706 | ::tensorflow::Input |
707 | min_filter, |
708 | ::tensorflow::Input |
709 | max_filter, const |
710 | gtl::ArraySlice<int>& |
711 | strides, StringPiece |
712 | padding) |
713 | : QuantizedConv2DPerChannel(scope, input, filter, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedConv2DPerChannel::Attrs()) {} |
714 | |
715 | QuantizedConv2DWithBias::QuantizedConv2DWithBias(const ::tensorflow::Scope& |
716 | scope, ::tensorflow::Input |
717 | input, ::tensorflow::Input |
718 | filter, ::tensorflow::Input |
719 | bias, ::tensorflow::Input |
720 | min_input, ::tensorflow::Input |
721 | max_input, ::tensorflow::Input |
722 | min_filter, |
723 | ::tensorflow::Input |
724 | max_filter, const |
725 | gtl::ArraySlice<int>& strides, |
726 | StringPiece padding, const |
727 | QuantizedConv2DWithBias::Attrs& |
728 | attrs) { |
729 | if (!scope.ok()) return; |
730 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
731 | if (!scope.ok()) return; |
732 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
733 | if (!scope.ok()) return; |
734 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
735 | if (!scope.ok()) return; |
736 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
737 | if (!scope.ok()) return; |
738 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
739 | if (!scope.ok()) return; |
740 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
741 | if (!scope.ok()) return; |
742 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
743 | if (!scope.ok()) return; |
744 | ::tensorflow::Node* ret; |
745 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBias" ); |
746 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBias" ) |
747 | .Input(_input) |
748 | .Input(_filter) |
749 | .Input(_bias) |
750 | .Input(_min_input) |
751 | .Input(_max_input) |
752 | .Input(_min_filter) |
753 | .Input(_max_filter) |
754 | .Attr("out_type" , attrs.out_type_) |
755 | .Attr("strides" , strides) |
756 | .Attr("padding" , padding) |
757 | .Attr("dilations" , attrs.dilations_) |
758 | .Attr("padding_list" , attrs.padding_list_) |
759 | ; |
760 | scope.UpdateBuilder(&builder); |
761 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
762 | if (!scope.ok()) return; |
763 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
764 | this->operation = Operation(ret); |
765 | ::tensorflow::NameRangeMap _outputs_range; |
766 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
767 | if (!_status_.ok()) { |
768 | scope.UpdateStatus(_status_); |
769 | return; |
770 | } |
771 | |
772 | this->output = Output(ret, _outputs_range["output" ].first); |
773 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
774 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
775 | } |
776 | |
777 | QuantizedConv2DWithBias::QuantizedConv2DWithBias(const ::tensorflow::Scope& |
778 | scope, ::tensorflow::Input |
779 | input, ::tensorflow::Input |
780 | filter, ::tensorflow::Input |
781 | bias, ::tensorflow::Input |
782 | min_input, ::tensorflow::Input |
783 | max_input, ::tensorflow::Input |
784 | min_filter, |
785 | ::tensorflow::Input |
786 | max_filter, const |
787 | gtl::ArraySlice<int>& strides, |
788 | StringPiece padding) |
789 | : QuantizedConv2DWithBias(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedConv2DWithBias::Attrs()) {} |
790 | |
791 | QuantizedConv2DWithBiasAndRelu::QuantizedConv2DWithBiasAndRelu(const |
792 | ::tensorflow::Scope& |
793 | scope, |
794 | ::tensorflow::Input |
795 | input, |
796 | ::tensorflow::Input |
797 | filter, |
798 | ::tensorflow::Input |
799 | bias, |
800 | ::tensorflow::Input |
801 | min_input, |
802 | ::tensorflow::Input |
803 | max_input, |
804 | ::tensorflow::Input |
805 | min_filter, |
806 | ::tensorflow::Input |
807 | max_filter, |
808 | const |
809 | gtl::ArraySlice<int>& |
810 | strides, |
811 | StringPiece |
812 | padding, const |
813 | QuantizedConv2DWithBiasAndRelu::Attrs& |
814 | attrs) { |
815 | if (!scope.ok()) return; |
816 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
817 | if (!scope.ok()) return; |
818 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
819 | if (!scope.ok()) return; |
820 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
821 | if (!scope.ok()) return; |
822 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
823 | if (!scope.ok()) return; |
824 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
825 | if (!scope.ok()) return; |
826 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
827 | if (!scope.ok()) return; |
828 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
829 | if (!scope.ok()) return; |
830 | ::tensorflow::Node* ret; |
831 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasAndRelu" ); |
832 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasAndRelu" ) |
833 | .Input(_input) |
834 | .Input(_filter) |
835 | .Input(_bias) |
836 | .Input(_min_input) |
837 | .Input(_max_input) |
838 | .Input(_min_filter) |
839 | .Input(_max_filter) |
840 | .Attr("out_type" , attrs.out_type_) |
841 | .Attr("strides" , strides) |
842 | .Attr("padding" , padding) |
843 | .Attr("dilations" , attrs.dilations_) |
844 | .Attr("padding_list" , attrs.padding_list_) |
845 | ; |
846 | scope.UpdateBuilder(&builder); |
847 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
848 | if (!scope.ok()) return; |
849 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
850 | this->operation = Operation(ret); |
851 | ::tensorflow::NameRangeMap _outputs_range; |
852 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
853 | if (!_status_.ok()) { |
854 | scope.UpdateStatus(_status_); |
855 | return; |
856 | } |
857 | |
858 | this->output = Output(ret, _outputs_range["output" ].first); |
859 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
860 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
861 | } |
862 | |
863 | QuantizedConv2DWithBiasAndRelu::QuantizedConv2DWithBiasAndRelu(const |
864 | ::tensorflow::Scope& |
865 | scope, |
866 | ::tensorflow::Input |
867 | input, |
868 | ::tensorflow::Input |
869 | filter, |
870 | ::tensorflow::Input |
871 | bias, |
872 | ::tensorflow::Input |
873 | min_input, |
874 | ::tensorflow::Input |
875 | max_input, |
876 | ::tensorflow::Input |
877 | min_filter, |
878 | ::tensorflow::Input |
879 | max_filter, |
880 | const |
881 | gtl::ArraySlice<int>& |
882 | strides, |
883 | StringPiece |
884 | padding) |
885 | : QuantizedConv2DWithBiasAndRelu(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedConv2DWithBiasAndRelu::Attrs()) {} |
886 | |
887 | QuantizedConv2DWithBiasAndReluAndRequantize::QuantizedConv2DWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, const gtl::ArraySlice<int>& strides, StringPiece padding, const QuantizedConv2DWithBiasAndReluAndRequantize::Attrs& |
888 | attrs) { |
889 | if (!scope.ok()) return; |
890 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
891 | if (!scope.ok()) return; |
892 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
893 | if (!scope.ok()) return; |
894 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
895 | if (!scope.ok()) return; |
896 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
897 | if (!scope.ok()) return; |
898 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
899 | if (!scope.ok()) return; |
900 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
901 | if (!scope.ok()) return; |
902 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
903 | if (!scope.ok()) return; |
904 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
905 | if (!scope.ok()) return; |
906 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
907 | if (!scope.ok()) return; |
908 | ::tensorflow::Node* ret; |
909 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasAndReluAndRequantize" ); |
910 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasAndReluAndRequantize" ) |
911 | .Input(_input) |
912 | .Input(_filter) |
913 | .Input(_bias) |
914 | .Input(_min_input) |
915 | .Input(_max_input) |
916 | .Input(_min_filter) |
917 | .Input(_max_filter) |
918 | .Input(_min_freezed_output) |
919 | .Input(_max_freezed_output) |
920 | .Attr("out_type" , attrs.out_type_) |
921 | .Attr("strides" , strides) |
922 | .Attr("padding" , padding) |
923 | .Attr("dilations" , attrs.dilations_) |
924 | .Attr("padding_list" , attrs.padding_list_) |
925 | ; |
926 | scope.UpdateBuilder(&builder); |
927 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
928 | if (!scope.ok()) return; |
929 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
930 | this->operation = Operation(ret); |
931 | ::tensorflow::NameRangeMap _outputs_range; |
932 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
933 | if (!_status_.ok()) { |
934 | scope.UpdateStatus(_status_); |
935 | return; |
936 | } |
937 | |
938 | this->output = Output(ret, _outputs_range["output" ].first); |
939 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
940 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
941 | } |
942 | |
943 | QuantizedConv2DWithBiasAndReluAndRequantize::QuantizedConv2DWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, const gtl::ArraySlice<int>& strides, StringPiece |
944 | padding) |
945 | : QuantizedConv2DWithBiasAndReluAndRequantize(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, strides, padding, QuantizedConv2DWithBiasAndReluAndRequantize::Attrs()) {} |
946 | |
947 | QuantizedConv2DWithBiasAndRequantize::QuantizedConv2DWithBiasAndRequantize(const |
948 | ::tensorflow::Scope& |
949 | scope, |
950 | ::tensorflow::Input |
951 | input, |
952 | ::tensorflow::Input |
953 | filter, |
954 | ::tensorflow::Input |
955 | bias, |
956 | ::tensorflow::Input |
957 | min_input, |
958 | ::tensorflow::Input |
959 | max_input, |
960 | ::tensorflow::Input |
961 | min_filter, |
962 | ::tensorflow::Input |
963 | max_filter, |
964 | ::tensorflow::Input |
965 | min_freezed_output, |
966 | ::tensorflow::Input |
967 | max_freezed_output, |
968 | const |
969 | gtl::ArraySlice<int>& |
970 | strides, |
971 | StringPiece |
972 | padding, |
973 | const |
974 | QuantizedConv2DWithBiasAndRequantize::Attrs& |
975 | attrs) { |
976 | if (!scope.ok()) return; |
977 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
978 | if (!scope.ok()) return; |
979 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
980 | if (!scope.ok()) return; |
981 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
982 | if (!scope.ok()) return; |
983 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
984 | if (!scope.ok()) return; |
985 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
986 | if (!scope.ok()) return; |
987 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
988 | if (!scope.ok()) return; |
989 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
990 | if (!scope.ok()) return; |
991 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
992 | if (!scope.ok()) return; |
993 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
994 | if (!scope.ok()) return; |
995 | ::tensorflow::Node* ret; |
996 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasAndRequantize" ); |
997 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasAndRequantize" ) |
998 | .Input(_input) |
999 | .Input(_filter) |
1000 | .Input(_bias) |
1001 | .Input(_min_input) |
1002 | .Input(_max_input) |
1003 | .Input(_min_filter) |
1004 | .Input(_max_filter) |
1005 | .Input(_min_freezed_output) |
1006 | .Input(_max_freezed_output) |
1007 | .Attr("out_type" , attrs.out_type_) |
1008 | .Attr("strides" , strides) |
1009 | .Attr("padding" , padding) |
1010 | .Attr("dilations" , attrs.dilations_) |
1011 | .Attr("padding_list" , attrs.padding_list_) |
1012 | ; |
1013 | scope.UpdateBuilder(&builder); |
1014 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1015 | if (!scope.ok()) return; |
1016 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1017 | this->operation = Operation(ret); |
1018 | ::tensorflow::NameRangeMap _outputs_range; |
1019 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1020 | if (!_status_.ok()) { |
1021 | scope.UpdateStatus(_status_); |
1022 | return; |
1023 | } |
1024 | |
1025 | this->output = Output(ret, _outputs_range["output" ].first); |
1026 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1027 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1028 | } |
1029 | |
1030 | QuantizedConv2DWithBiasAndRequantize::QuantizedConv2DWithBiasAndRequantize(const |
1031 | ::tensorflow::Scope& |
1032 | scope, |
1033 | ::tensorflow::Input |
1034 | input, |
1035 | ::tensorflow::Input |
1036 | filter, |
1037 | ::tensorflow::Input |
1038 | bias, |
1039 | ::tensorflow::Input |
1040 | min_input, |
1041 | ::tensorflow::Input |
1042 | max_input, |
1043 | ::tensorflow::Input |
1044 | min_filter, |
1045 | ::tensorflow::Input |
1046 | max_filter, |
1047 | ::tensorflow::Input |
1048 | min_freezed_output, |
1049 | ::tensorflow::Input |
1050 | max_freezed_output, |
1051 | const |
1052 | gtl::ArraySlice<int>& |
1053 | strides, |
1054 | StringPiece |
1055 | padding) |
1056 | : QuantizedConv2DWithBiasAndRequantize(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, strides, padding, QuantizedConv2DWithBiasAndRequantize::Attrs()) {} |
1057 | |
1058 | QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::QuantizedConv2DWithBiasSignedSumAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, ::tensorflow::Input summand, ::tensorflow::Input min_summand, ::tensorflow::Input max_summand, const gtl::ArraySlice<int>& strides, StringPiece padding, const QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::Attrs& |
1059 | attrs) { |
1060 | if (!scope.ok()) return; |
1061 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1062 | if (!scope.ok()) return; |
1063 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1064 | if (!scope.ok()) return; |
1065 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1066 | if (!scope.ok()) return; |
1067 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1068 | if (!scope.ok()) return; |
1069 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1070 | if (!scope.ok()) return; |
1071 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1072 | if (!scope.ok()) return; |
1073 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1074 | if (!scope.ok()) return; |
1075 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1076 | if (!scope.ok()) return; |
1077 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1078 | if (!scope.ok()) return; |
1079 | auto _summand = ::tensorflow::ops::AsNodeOut(scope, summand); |
1080 | if (!scope.ok()) return; |
1081 | auto _min_summand = ::tensorflow::ops::AsNodeOut(scope, min_summand); |
1082 | if (!scope.ok()) return; |
1083 | auto _max_summand = ::tensorflow::ops::AsNodeOut(scope, max_summand); |
1084 | if (!scope.ok()) return; |
1085 | ::tensorflow::Node* ret; |
1086 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasSignedSumAndReluAndRequantize" ); |
1087 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasSignedSumAndReluAndRequantize" ) |
1088 | .Input(_input) |
1089 | .Input(_filter) |
1090 | .Input(_bias) |
1091 | .Input(_min_input) |
1092 | .Input(_max_input) |
1093 | .Input(_min_filter) |
1094 | .Input(_max_filter) |
1095 | .Input(_min_freezed_output) |
1096 | .Input(_max_freezed_output) |
1097 | .Input(_summand) |
1098 | .Input(_min_summand) |
1099 | .Input(_max_summand) |
1100 | .Attr("out_type" , attrs.out_type_) |
1101 | .Attr("strides" , strides) |
1102 | .Attr("padding" , padding) |
1103 | .Attr("dilations" , attrs.dilations_) |
1104 | .Attr("padding_list" , attrs.padding_list_) |
1105 | ; |
1106 | scope.UpdateBuilder(&builder); |
1107 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1108 | if (!scope.ok()) return; |
1109 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1110 | this->operation = Operation(ret); |
1111 | ::tensorflow::NameRangeMap _outputs_range; |
1112 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1113 | if (!_status_.ok()) { |
1114 | scope.UpdateStatus(_status_); |
1115 | return; |
1116 | } |
1117 | |
1118 | this->output = Output(ret, _outputs_range["output" ].first); |
1119 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1120 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1121 | } |
1122 | |
1123 | QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::QuantizedConv2DWithBiasSignedSumAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, ::tensorflow::Input summand, ::tensorflow::Input min_summand, ::tensorflow::Input max_summand, const gtl::ArraySlice<int>& strides, StringPiece |
1124 | padding) |
1125 | : QuantizedConv2DWithBiasSignedSumAndReluAndRequantize(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, strides, padding, QuantizedConv2DWithBiasSignedSumAndReluAndRequantize::Attrs()) {} |
1126 | |
1127 | QuantizedConv2DWithBiasSumAndRelu::QuantizedConv2DWithBiasSumAndRelu(const |
1128 | ::tensorflow::Scope& |
1129 | scope, |
1130 | ::tensorflow::Input |
1131 | input, |
1132 | ::tensorflow::Input |
1133 | filter, |
1134 | ::tensorflow::Input |
1135 | bias, |
1136 | ::tensorflow::Input |
1137 | min_input, |
1138 | ::tensorflow::Input |
1139 | max_input, |
1140 | ::tensorflow::Input |
1141 | min_filter, |
1142 | ::tensorflow::Input |
1143 | max_filter, |
1144 | ::tensorflow::Input |
1145 | summand, |
1146 | const |
1147 | gtl::ArraySlice<int>& |
1148 | strides, |
1149 | StringPiece |
1150 | padding, |
1151 | const |
1152 | QuantizedConv2DWithBiasSumAndRelu::Attrs& |
1153 | attrs) { |
1154 | if (!scope.ok()) return; |
1155 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1156 | if (!scope.ok()) return; |
1157 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1158 | if (!scope.ok()) return; |
1159 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1160 | if (!scope.ok()) return; |
1161 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1162 | if (!scope.ok()) return; |
1163 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1164 | if (!scope.ok()) return; |
1165 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1166 | if (!scope.ok()) return; |
1167 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1168 | if (!scope.ok()) return; |
1169 | auto _summand = ::tensorflow::ops::AsNodeOut(scope, summand); |
1170 | if (!scope.ok()) return; |
1171 | ::tensorflow::Node* ret; |
1172 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasSumAndRelu" ); |
1173 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasSumAndRelu" ) |
1174 | .Input(_input) |
1175 | .Input(_filter) |
1176 | .Input(_bias) |
1177 | .Input(_min_input) |
1178 | .Input(_max_input) |
1179 | .Input(_min_filter) |
1180 | .Input(_max_filter) |
1181 | .Input(_summand) |
1182 | .Attr("out_type" , attrs.out_type_) |
1183 | .Attr("strides" , strides) |
1184 | .Attr("padding" , padding) |
1185 | .Attr("dilations" , attrs.dilations_) |
1186 | .Attr("padding_list" , attrs.padding_list_) |
1187 | ; |
1188 | scope.UpdateBuilder(&builder); |
1189 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1190 | if (!scope.ok()) return; |
1191 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1192 | this->operation = Operation(ret); |
1193 | ::tensorflow::NameRangeMap _outputs_range; |
1194 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1195 | if (!_status_.ok()) { |
1196 | scope.UpdateStatus(_status_); |
1197 | return; |
1198 | } |
1199 | |
1200 | this->output = Output(ret, _outputs_range["output" ].first); |
1201 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1202 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1203 | } |
1204 | |
1205 | QuantizedConv2DWithBiasSumAndRelu::QuantizedConv2DWithBiasSumAndRelu(const |
1206 | ::tensorflow::Scope& |
1207 | scope, |
1208 | ::tensorflow::Input |
1209 | input, |
1210 | ::tensorflow::Input |
1211 | filter, |
1212 | ::tensorflow::Input |
1213 | bias, |
1214 | ::tensorflow::Input |
1215 | min_input, |
1216 | ::tensorflow::Input |
1217 | max_input, |
1218 | ::tensorflow::Input |
1219 | min_filter, |
1220 | ::tensorflow::Input |
1221 | max_filter, |
1222 | ::tensorflow::Input |
1223 | summand, |
1224 | const |
1225 | gtl::ArraySlice<int>& |
1226 | strides, |
1227 | StringPiece |
1228 | padding) |
1229 | : QuantizedConv2DWithBiasSumAndRelu(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, summand, strides, padding, QuantizedConv2DWithBiasSumAndRelu::Attrs()) {} |
1230 | |
1231 | QuantizedConv2DWithBiasSumAndReluAndRequantize::QuantizedConv2DWithBiasSumAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, ::tensorflow::Input summand, ::tensorflow::Input min_summand, ::tensorflow::Input max_summand, const gtl::ArraySlice<int>& strides, StringPiece padding, const QuantizedConv2DWithBiasSumAndReluAndRequantize::Attrs& |
1232 | attrs) { |
1233 | if (!scope.ok()) return; |
1234 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1235 | if (!scope.ok()) return; |
1236 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1237 | if (!scope.ok()) return; |
1238 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1239 | if (!scope.ok()) return; |
1240 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1241 | if (!scope.ok()) return; |
1242 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1243 | if (!scope.ok()) return; |
1244 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1245 | if (!scope.ok()) return; |
1246 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1247 | if (!scope.ok()) return; |
1248 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1249 | if (!scope.ok()) return; |
1250 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1251 | if (!scope.ok()) return; |
1252 | auto _summand = ::tensorflow::ops::AsNodeOut(scope, summand); |
1253 | if (!scope.ok()) return; |
1254 | auto _min_summand = ::tensorflow::ops::AsNodeOut(scope, min_summand); |
1255 | if (!scope.ok()) return; |
1256 | auto _max_summand = ::tensorflow::ops::AsNodeOut(scope, max_summand); |
1257 | if (!scope.ok()) return; |
1258 | ::tensorflow::Node* ret; |
1259 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedConv2DWithBiasSumAndReluAndRequantize" ); |
1260 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedConv2DWithBiasSumAndReluAndRequantize" ) |
1261 | .Input(_input) |
1262 | .Input(_filter) |
1263 | .Input(_bias) |
1264 | .Input(_min_input) |
1265 | .Input(_max_input) |
1266 | .Input(_min_filter) |
1267 | .Input(_max_filter) |
1268 | .Input(_min_freezed_output) |
1269 | .Input(_max_freezed_output) |
1270 | .Input(_summand) |
1271 | .Input(_min_summand) |
1272 | .Input(_max_summand) |
1273 | .Attr("out_type" , attrs.out_type_) |
1274 | .Attr("strides" , strides) |
1275 | .Attr("padding" , padding) |
1276 | .Attr("dilations" , attrs.dilations_) |
1277 | .Attr("padding_list" , attrs.padding_list_) |
1278 | ; |
1279 | scope.UpdateBuilder(&builder); |
1280 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1281 | if (!scope.ok()) return; |
1282 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1283 | this->operation = Operation(ret); |
1284 | ::tensorflow::NameRangeMap _outputs_range; |
1285 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1286 | if (!_status_.ok()) { |
1287 | scope.UpdateStatus(_status_); |
1288 | return; |
1289 | } |
1290 | |
1291 | this->output = Output(ret, _outputs_range["output" ].first); |
1292 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1293 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1294 | } |
1295 | |
1296 | QuantizedConv2DWithBiasSumAndReluAndRequantize::QuantizedConv2DWithBiasSumAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, ::tensorflow::Input summand, ::tensorflow::Input min_summand, ::tensorflow::Input max_summand, const gtl::ArraySlice<int>& strides, StringPiece |
1297 | padding) |
1298 | : QuantizedConv2DWithBiasSumAndReluAndRequantize(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, summand, min_summand, max_summand, strides, padding, QuantizedConv2DWithBiasSumAndReluAndRequantize::Attrs()) {} |
1299 | |
1300 | QuantizedDepthwiseConv2D::QuantizedDepthwiseConv2D(const ::tensorflow::Scope& |
1301 | scope, ::tensorflow::Input |
1302 | input, ::tensorflow::Input |
1303 | filter, ::tensorflow::Input |
1304 | min_input, |
1305 | ::tensorflow::Input |
1306 | max_input, |
1307 | ::tensorflow::Input |
1308 | min_filter, |
1309 | ::tensorflow::Input |
1310 | max_filter, const |
1311 | gtl::ArraySlice<int>& |
1312 | strides, StringPiece |
1313 | padding, const |
1314 | QuantizedDepthwiseConv2D::Attrs& |
1315 | attrs) { |
1316 | if (!scope.ok()) return; |
1317 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1318 | if (!scope.ok()) return; |
1319 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1320 | if (!scope.ok()) return; |
1321 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1322 | if (!scope.ok()) return; |
1323 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1324 | if (!scope.ok()) return; |
1325 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1326 | if (!scope.ok()) return; |
1327 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1328 | if (!scope.ok()) return; |
1329 | ::tensorflow::Node* ret; |
1330 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedDepthwiseConv2D" ); |
1331 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedDepthwiseConv2D" ) |
1332 | .Input(_input) |
1333 | .Input(_filter) |
1334 | .Input(_min_input) |
1335 | .Input(_max_input) |
1336 | .Input(_min_filter) |
1337 | .Input(_max_filter) |
1338 | .Attr("out_type" , attrs.out_type_) |
1339 | .Attr("strides" , strides) |
1340 | .Attr("padding" , padding) |
1341 | .Attr("dilations" , attrs.dilations_) |
1342 | ; |
1343 | scope.UpdateBuilder(&builder); |
1344 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1345 | if (!scope.ok()) return; |
1346 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1347 | this->operation = Operation(ret); |
1348 | ::tensorflow::NameRangeMap _outputs_range; |
1349 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1350 | if (!_status_.ok()) { |
1351 | scope.UpdateStatus(_status_); |
1352 | return; |
1353 | } |
1354 | |
1355 | this->output = Output(ret, _outputs_range["output" ].first); |
1356 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1357 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1358 | } |
1359 | |
1360 | QuantizedDepthwiseConv2D::QuantizedDepthwiseConv2D(const ::tensorflow::Scope& |
1361 | scope, ::tensorflow::Input |
1362 | input, ::tensorflow::Input |
1363 | filter, ::tensorflow::Input |
1364 | min_input, |
1365 | ::tensorflow::Input |
1366 | max_input, |
1367 | ::tensorflow::Input |
1368 | min_filter, |
1369 | ::tensorflow::Input |
1370 | max_filter, const |
1371 | gtl::ArraySlice<int>& |
1372 | strides, StringPiece |
1373 | padding) |
1374 | : QuantizedDepthwiseConv2D(scope, input, filter, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedDepthwiseConv2D::Attrs()) {} |
1375 | |
1376 | QuantizedDepthwiseConv2DWithBias::QuantizedDepthwiseConv2DWithBias(const |
1377 | ::tensorflow::Scope& |
1378 | scope, |
1379 | ::tensorflow::Input |
1380 | input, |
1381 | ::tensorflow::Input |
1382 | filter, |
1383 | ::tensorflow::Input |
1384 | bias, |
1385 | ::tensorflow::Input |
1386 | min_input, |
1387 | ::tensorflow::Input |
1388 | max_input, |
1389 | ::tensorflow::Input |
1390 | min_filter, |
1391 | ::tensorflow::Input |
1392 | max_filter, |
1393 | const |
1394 | gtl::ArraySlice<int>& |
1395 | strides, |
1396 | StringPiece |
1397 | padding, |
1398 | const |
1399 | QuantizedDepthwiseConv2DWithBias::Attrs& |
1400 | attrs) { |
1401 | if (!scope.ok()) return; |
1402 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1403 | if (!scope.ok()) return; |
1404 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1405 | if (!scope.ok()) return; |
1406 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1407 | if (!scope.ok()) return; |
1408 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1409 | if (!scope.ok()) return; |
1410 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1411 | if (!scope.ok()) return; |
1412 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1413 | if (!scope.ok()) return; |
1414 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1415 | if (!scope.ok()) return; |
1416 | ::tensorflow::Node* ret; |
1417 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedDepthwiseConv2DWithBias" ); |
1418 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedDepthwiseConv2DWithBias" ) |
1419 | .Input(_input) |
1420 | .Input(_filter) |
1421 | .Input(_bias) |
1422 | .Input(_min_input) |
1423 | .Input(_max_input) |
1424 | .Input(_min_filter) |
1425 | .Input(_max_filter) |
1426 | .Attr("out_type" , attrs.out_type_) |
1427 | .Attr("strides" , strides) |
1428 | .Attr("padding" , padding) |
1429 | .Attr("dilations" , attrs.dilations_) |
1430 | ; |
1431 | scope.UpdateBuilder(&builder); |
1432 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1433 | if (!scope.ok()) return; |
1434 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1435 | this->operation = Operation(ret); |
1436 | ::tensorflow::NameRangeMap _outputs_range; |
1437 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1438 | if (!_status_.ok()) { |
1439 | scope.UpdateStatus(_status_); |
1440 | return; |
1441 | } |
1442 | |
1443 | this->output = Output(ret, _outputs_range["output" ].first); |
1444 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1445 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1446 | } |
1447 | |
1448 | QuantizedDepthwiseConv2DWithBias::QuantizedDepthwiseConv2DWithBias(const |
1449 | ::tensorflow::Scope& |
1450 | scope, |
1451 | ::tensorflow::Input |
1452 | input, |
1453 | ::tensorflow::Input |
1454 | filter, |
1455 | ::tensorflow::Input |
1456 | bias, |
1457 | ::tensorflow::Input |
1458 | min_input, |
1459 | ::tensorflow::Input |
1460 | max_input, |
1461 | ::tensorflow::Input |
1462 | min_filter, |
1463 | ::tensorflow::Input |
1464 | max_filter, |
1465 | const |
1466 | gtl::ArraySlice<int>& |
1467 | strides, |
1468 | StringPiece |
1469 | padding) |
1470 | : QuantizedDepthwiseConv2DWithBias(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedDepthwiseConv2DWithBias::Attrs()) {} |
1471 | |
1472 | QuantizedDepthwiseConv2DWithBiasAndRelu::QuantizedDepthwiseConv2DWithBiasAndRelu(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, const gtl::ArraySlice<int>& strides, StringPiece padding, const QuantizedDepthwiseConv2DWithBiasAndRelu::Attrs& |
1473 | attrs) { |
1474 | if (!scope.ok()) return; |
1475 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1476 | if (!scope.ok()) return; |
1477 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1478 | if (!scope.ok()) return; |
1479 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1480 | if (!scope.ok()) return; |
1481 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1482 | if (!scope.ok()) return; |
1483 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1484 | if (!scope.ok()) return; |
1485 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1486 | if (!scope.ok()) return; |
1487 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1488 | if (!scope.ok()) return; |
1489 | ::tensorflow::Node* ret; |
1490 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedDepthwiseConv2DWithBiasAndRelu" ); |
1491 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedDepthwiseConv2DWithBiasAndRelu" ) |
1492 | .Input(_input) |
1493 | .Input(_filter) |
1494 | .Input(_bias) |
1495 | .Input(_min_input) |
1496 | .Input(_max_input) |
1497 | .Input(_min_filter) |
1498 | .Input(_max_filter) |
1499 | .Attr("out_type" , attrs.out_type_) |
1500 | .Attr("strides" , strides) |
1501 | .Attr("padding" , padding) |
1502 | .Attr("dilations" , attrs.dilations_) |
1503 | .Attr("padding_list" , attrs.padding_list_) |
1504 | ; |
1505 | scope.UpdateBuilder(&builder); |
1506 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1507 | if (!scope.ok()) return; |
1508 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1509 | this->operation = Operation(ret); |
1510 | ::tensorflow::NameRangeMap _outputs_range; |
1511 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1512 | if (!_status_.ok()) { |
1513 | scope.UpdateStatus(_status_); |
1514 | return; |
1515 | } |
1516 | |
1517 | this->output = Output(ret, _outputs_range["output" ].first); |
1518 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1519 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1520 | } |
1521 | |
1522 | QuantizedDepthwiseConv2DWithBiasAndRelu::QuantizedDepthwiseConv2DWithBiasAndRelu(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, const gtl::ArraySlice<int>& strides, StringPiece |
1523 | padding) |
1524 | : QuantizedDepthwiseConv2DWithBiasAndRelu(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, strides, padding, QuantizedDepthwiseConv2DWithBiasAndRelu::Attrs()) {} |
1525 | |
1526 | QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, const gtl::ArraySlice<int>& strides, StringPiece padding, const QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::Attrs& |
1527 | attrs) { |
1528 | if (!scope.ok()) return; |
1529 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
1530 | if (!scope.ok()) return; |
1531 | auto _filter = ::tensorflow::ops::AsNodeOut(scope, filter); |
1532 | if (!scope.ok()) return; |
1533 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1534 | if (!scope.ok()) return; |
1535 | auto _min_input = ::tensorflow::ops::AsNodeOut(scope, min_input); |
1536 | if (!scope.ok()) return; |
1537 | auto _max_input = ::tensorflow::ops::AsNodeOut(scope, max_input); |
1538 | if (!scope.ok()) return; |
1539 | auto _min_filter = ::tensorflow::ops::AsNodeOut(scope, min_filter); |
1540 | if (!scope.ok()) return; |
1541 | auto _max_filter = ::tensorflow::ops::AsNodeOut(scope, max_filter); |
1542 | if (!scope.ok()) return; |
1543 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1544 | if (!scope.ok()) return; |
1545 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1546 | if (!scope.ok()) return; |
1547 | ::tensorflow::Node* ret; |
1548 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize" ); |
1549 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize" ) |
1550 | .Input(_input) |
1551 | .Input(_filter) |
1552 | .Input(_bias) |
1553 | .Input(_min_input) |
1554 | .Input(_max_input) |
1555 | .Input(_min_filter) |
1556 | .Input(_max_filter) |
1557 | .Input(_min_freezed_output) |
1558 | .Input(_max_freezed_output) |
1559 | .Attr("out_type" , attrs.out_type_) |
1560 | .Attr("strides" , strides) |
1561 | .Attr("padding" , padding) |
1562 | .Attr("dilations" , attrs.dilations_) |
1563 | .Attr("padding_list" , attrs.padding_list_) |
1564 | ; |
1565 | scope.UpdateBuilder(&builder); |
1566 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1567 | if (!scope.ok()) return; |
1568 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1569 | this->operation = Operation(ret); |
1570 | ::tensorflow::NameRangeMap _outputs_range; |
1571 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1572 | if (!_status_.ok()) { |
1573 | scope.UpdateStatus(_status_); |
1574 | return; |
1575 | } |
1576 | |
1577 | this->output = Output(ret, _outputs_range["output" ].first); |
1578 | this->min_output = Output(ret, _outputs_range["min_output" ].first); |
1579 | this->max_output = Output(ret, _outputs_range["max_output" ].first); |
1580 | } |
1581 | |
1582 | QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input input, ::tensorflow::Input filter, ::tensorflow::Input bias, ::tensorflow::Input min_input, ::tensorflow::Input max_input, ::tensorflow::Input min_filter, ::tensorflow::Input max_filter, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, const gtl::ArraySlice<int>& strides, StringPiece |
1583 | padding) |
1584 | : QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize(scope, input, filter, bias, min_input, max_input, min_filter, max_filter, min_freezed_output, max_freezed_output, strides, padding, QuantizedDepthwiseConv2DWithBiasAndReluAndRequantize::Attrs()) {} |
1585 | |
1586 | QuantizedMatMulWithBias::QuantizedMatMulWithBias(const ::tensorflow::Scope& |
1587 | scope, ::tensorflow::Input a, |
1588 | ::tensorflow::Input b, |
1589 | ::tensorflow::Input bias, |
1590 | ::tensorflow::Input min_a, |
1591 | ::tensorflow::Input max_a, |
1592 | ::tensorflow::Input min_b, |
1593 | ::tensorflow::Input max_b, |
1594 | const |
1595 | QuantizedMatMulWithBias::Attrs& |
1596 | attrs) { |
1597 | if (!scope.ok()) return; |
1598 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
1599 | if (!scope.ok()) return; |
1600 | auto _b = ::tensorflow::ops::AsNodeOut(scope, b); |
1601 | if (!scope.ok()) return; |
1602 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1603 | if (!scope.ok()) return; |
1604 | auto _min_a = ::tensorflow::ops::AsNodeOut(scope, min_a); |
1605 | if (!scope.ok()) return; |
1606 | auto _max_a = ::tensorflow::ops::AsNodeOut(scope, max_a); |
1607 | if (!scope.ok()) return; |
1608 | auto _min_b = ::tensorflow::ops::AsNodeOut(scope, min_b); |
1609 | if (!scope.ok()) return; |
1610 | auto _max_b = ::tensorflow::ops::AsNodeOut(scope, max_b); |
1611 | if (!scope.ok()) return; |
1612 | ::tensorflow::Node* ret; |
1613 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedMatMulWithBias" ); |
1614 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedMatMulWithBias" ) |
1615 | .Input(_a) |
1616 | .Input(_b) |
1617 | .Input(_bias) |
1618 | .Input(_min_a) |
1619 | .Input(_max_a) |
1620 | .Input(_min_b) |
1621 | .Input(_max_b) |
1622 | .Attr("Toutput" , attrs.Toutput_) |
1623 | .Attr("transpose_a" , attrs.transpose_a_) |
1624 | .Attr("transpose_b" , attrs.transpose_b_) |
1625 | .Attr("input_quant_mode" , attrs.input_quant_mode_) |
1626 | ; |
1627 | scope.UpdateBuilder(&builder); |
1628 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1629 | if (!scope.ok()) return; |
1630 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1631 | this->operation = Operation(ret); |
1632 | ::tensorflow::NameRangeMap _outputs_range; |
1633 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1634 | if (!_status_.ok()) { |
1635 | scope.UpdateStatus(_status_); |
1636 | return; |
1637 | } |
1638 | |
1639 | this->out = Output(ret, _outputs_range["out" ].first); |
1640 | this->min_out = Output(ret, _outputs_range["min_out" ].first); |
1641 | this->max_out = Output(ret, _outputs_range["max_out" ].first); |
1642 | } |
1643 | |
1644 | QuantizedMatMulWithBias::QuantizedMatMulWithBias(const ::tensorflow::Scope& |
1645 | scope, ::tensorflow::Input a, |
1646 | ::tensorflow::Input b, |
1647 | ::tensorflow::Input bias, |
1648 | ::tensorflow::Input min_a, |
1649 | ::tensorflow::Input max_a, |
1650 | ::tensorflow::Input min_b, |
1651 | ::tensorflow::Input max_b) |
1652 | : QuantizedMatMulWithBias(scope, a, b, bias, min_a, max_a, min_b, max_b, QuantizedMatMulWithBias::Attrs()) {} |
1653 | |
1654 | QuantizedMatMulWithBiasAndDequantize::QuantizedMatMulWithBiasAndDequantize(const |
1655 | ::tensorflow::Scope& |
1656 | scope, |
1657 | ::tensorflow::Input |
1658 | a, |
1659 | ::tensorflow::Input |
1660 | b, |
1661 | ::tensorflow::Input |
1662 | bias, |
1663 | ::tensorflow::Input |
1664 | min_a, |
1665 | ::tensorflow::Input |
1666 | max_a, |
1667 | ::tensorflow::Input |
1668 | min_b, |
1669 | ::tensorflow::Input |
1670 | max_b, |
1671 | ::tensorflow::Input |
1672 | min_freezed_output, |
1673 | ::tensorflow::Input |
1674 | max_freezed_output, |
1675 | DataType |
1676 | Toutput, |
1677 | const |
1678 | QuantizedMatMulWithBiasAndDequantize::Attrs& |
1679 | attrs) { |
1680 | if (!scope.ok()) return; |
1681 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
1682 | if (!scope.ok()) return; |
1683 | auto _b = ::tensorflow::ops::AsNodeOut(scope, b); |
1684 | if (!scope.ok()) return; |
1685 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1686 | if (!scope.ok()) return; |
1687 | auto _min_a = ::tensorflow::ops::AsNodeOut(scope, min_a); |
1688 | if (!scope.ok()) return; |
1689 | auto _max_a = ::tensorflow::ops::AsNodeOut(scope, max_a); |
1690 | if (!scope.ok()) return; |
1691 | auto _min_b = ::tensorflow::ops::AsNodeOut(scope, min_b); |
1692 | if (!scope.ok()) return; |
1693 | auto _max_b = ::tensorflow::ops::AsNodeOut(scope, max_b); |
1694 | if (!scope.ok()) return; |
1695 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1696 | if (!scope.ok()) return; |
1697 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1698 | if (!scope.ok()) return; |
1699 | ::tensorflow::Node* ret; |
1700 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedMatMulWithBiasAndDequantize" ); |
1701 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedMatMulWithBiasAndDequantize" ) |
1702 | .Input(_a) |
1703 | .Input(_b) |
1704 | .Input(_bias) |
1705 | .Input(_min_a) |
1706 | .Input(_max_a) |
1707 | .Input(_min_b) |
1708 | .Input(_max_b) |
1709 | .Input(_min_freezed_output) |
1710 | .Input(_max_freezed_output) |
1711 | .Attr("Toutput" , Toutput) |
1712 | .Attr("transpose_a" , attrs.transpose_a_) |
1713 | .Attr("transpose_b" , attrs.transpose_b_) |
1714 | .Attr("input_quant_mode" , attrs.input_quant_mode_) |
1715 | ; |
1716 | scope.UpdateBuilder(&builder); |
1717 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1718 | if (!scope.ok()) return; |
1719 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1720 | this->operation = Operation(ret); |
1721 | this->out = Output(ret, 0); |
1722 | } |
1723 | |
1724 | QuantizedMatMulWithBiasAndDequantize::QuantizedMatMulWithBiasAndDequantize(const |
1725 | ::tensorflow::Scope& |
1726 | scope, |
1727 | ::tensorflow::Input |
1728 | a, |
1729 | ::tensorflow::Input |
1730 | b, |
1731 | ::tensorflow::Input |
1732 | bias, |
1733 | ::tensorflow::Input |
1734 | min_a, |
1735 | ::tensorflow::Input |
1736 | max_a, |
1737 | ::tensorflow::Input |
1738 | min_b, |
1739 | ::tensorflow::Input |
1740 | max_b, |
1741 | ::tensorflow::Input |
1742 | min_freezed_output, |
1743 | ::tensorflow::Input |
1744 | max_freezed_output, |
1745 | DataType |
1746 | Toutput) |
1747 | : QuantizedMatMulWithBiasAndDequantize(scope, a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, Toutput, QuantizedMatMulWithBiasAndDequantize::Attrs()) {} |
1748 | |
1749 | QuantizedMatMulWithBiasAndRelu::QuantizedMatMulWithBiasAndRelu(const |
1750 | ::tensorflow::Scope& |
1751 | scope, |
1752 | ::tensorflow::Input |
1753 | a, |
1754 | ::tensorflow::Input |
1755 | b, |
1756 | ::tensorflow::Input |
1757 | bias, |
1758 | ::tensorflow::Input |
1759 | min_a, |
1760 | ::tensorflow::Input |
1761 | max_a, |
1762 | ::tensorflow::Input |
1763 | min_b, |
1764 | ::tensorflow::Input |
1765 | max_b, const |
1766 | QuantizedMatMulWithBiasAndRelu::Attrs& |
1767 | attrs) { |
1768 | if (!scope.ok()) return; |
1769 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
1770 | if (!scope.ok()) return; |
1771 | auto _b = ::tensorflow::ops::AsNodeOut(scope, b); |
1772 | if (!scope.ok()) return; |
1773 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1774 | if (!scope.ok()) return; |
1775 | auto _min_a = ::tensorflow::ops::AsNodeOut(scope, min_a); |
1776 | if (!scope.ok()) return; |
1777 | auto _max_a = ::tensorflow::ops::AsNodeOut(scope, max_a); |
1778 | if (!scope.ok()) return; |
1779 | auto _min_b = ::tensorflow::ops::AsNodeOut(scope, min_b); |
1780 | if (!scope.ok()) return; |
1781 | auto _max_b = ::tensorflow::ops::AsNodeOut(scope, max_b); |
1782 | if (!scope.ok()) return; |
1783 | ::tensorflow::Node* ret; |
1784 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedMatMulWithBiasAndRelu" ); |
1785 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedMatMulWithBiasAndRelu" ) |
1786 | .Input(_a) |
1787 | .Input(_b) |
1788 | .Input(_bias) |
1789 | .Input(_min_a) |
1790 | .Input(_max_a) |
1791 | .Input(_min_b) |
1792 | .Input(_max_b) |
1793 | .Attr("Toutput" , attrs.Toutput_) |
1794 | .Attr("transpose_a" , attrs.transpose_a_) |
1795 | .Attr("transpose_b" , attrs.transpose_b_) |
1796 | .Attr("input_quant_mode" , attrs.input_quant_mode_) |
1797 | ; |
1798 | scope.UpdateBuilder(&builder); |
1799 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1800 | if (!scope.ok()) return; |
1801 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1802 | this->operation = Operation(ret); |
1803 | ::tensorflow::NameRangeMap _outputs_range; |
1804 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1805 | if (!_status_.ok()) { |
1806 | scope.UpdateStatus(_status_); |
1807 | return; |
1808 | } |
1809 | |
1810 | this->out = Output(ret, _outputs_range["out" ].first); |
1811 | this->min_out = Output(ret, _outputs_range["min_out" ].first); |
1812 | this->max_out = Output(ret, _outputs_range["max_out" ].first); |
1813 | } |
1814 | |
1815 | QuantizedMatMulWithBiasAndRelu::QuantizedMatMulWithBiasAndRelu(const |
1816 | ::tensorflow::Scope& |
1817 | scope, |
1818 | ::tensorflow::Input |
1819 | a, |
1820 | ::tensorflow::Input |
1821 | b, |
1822 | ::tensorflow::Input |
1823 | bias, |
1824 | ::tensorflow::Input |
1825 | min_a, |
1826 | ::tensorflow::Input |
1827 | max_a, |
1828 | ::tensorflow::Input |
1829 | min_b, |
1830 | ::tensorflow::Input |
1831 | max_b) |
1832 | : QuantizedMatMulWithBiasAndRelu(scope, a, b, bias, min_a, max_a, min_b, max_b, QuantizedMatMulWithBiasAndRelu::Attrs()) {} |
1833 | |
1834 | QuantizedMatMulWithBiasAndReluAndRequantize::QuantizedMatMulWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input a, ::tensorflow::Input b, ::tensorflow::Input bias, ::tensorflow::Input min_a, ::tensorflow::Input max_a, ::tensorflow::Input min_b, ::tensorflow::Input max_b, ::tensorflow::Input min_freezed_output, ::tensorflow::Input max_freezed_output, const QuantizedMatMulWithBiasAndReluAndRequantize::Attrs& |
1835 | attrs) { |
1836 | if (!scope.ok()) return; |
1837 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
1838 | if (!scope.ok()) return; |
1839 | auto _b = ::tensorflow::ops::AsNodeOut(scope, b); |
1840 | if (!scope.ok()) return; |
1841 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1842 | if (!scope.ok()) return; |
1843 | auto _min_a = ::tensorflow::ops::AsNodeOut(scope, min_a); |
1844 | if (!scope.ok()) return; |
1845 | auto _max_a = ::tensorflow::ops::AsNodeOut(scope, max_a); |
1846 | if (!scope.ok()) return; |
1847 | auto _min_b = ::tensorflow::ops::AsNodeOut(scope, min_b); |
1848 | if (!scope.ok()) return; |
1849 | auto _max_b = ::tensorflow::ops::AsNodeOut(scope, max_b); |
1850 | if (!scope.ok()) return; |
1851 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1852 | if (!scope.ok()) return; |
1853 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1854 | if (!scope.ok()) return; |
1855 | ::tensorflow::Node* ret; |
1856 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedMatMulWithBiasAndReluAndRequantize" ); |
1857 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedMatMulWithBiasAndReluAndRequantize" ) |
1858 | .Input(_a) |
1859 | .Input(_b) |
1860 | .Input(_bias) |
1861 | .Input(_min_a) |
1862 | .Input(_max_a) |
1863 | .Input(_min_b) |
1864 | .Input(_max_b) |
1865 | .Input(_min_freezed_output) |
1866 | .Input(_max_freezed_output) |
1867 | .Attr("Toutput" , attrs.Toutput_) |
1868 | .Attr("transpose_a" , attrs.transpose_a_) |
1869 | .Attr("transpose_b" , attrs.transpose_b_) |
1870 | .Attr("input_quant_mode" , attrs.input_quant_mode_) |
1871 | ; |
1872 | scope.UpdateBuilder(&builder); |
1873 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1874 | if (!scope.ok()) return; |
1875 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1876 | this->operation = Operation(ret); |
1877 | ::tensorflow::NameRangeMap _outputs_range; |
1878 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1879 | if (!_status_.ok()) { |
1880 | scope.UpdateStatus(_status_); |
1881 | return; |
1882 | } |
1883 | |
1884 | this->out = Output(ret, _outputs_range["out" ].first); |
1885 | this->min_out = Output(ret, _outputs_range["min_out" ].first); |
1886 | this->max_out = Output(ret, _outputs_range["max_out" ].first); |
1887 | } |
1888 | |
1889 | QuantizedMatMulWithBiasAndReluAndRequantize::QuantizedMatMulWithBiasAndReluAndRequantize(const ::tensorflow::Scope& scope, ::tensorflow::Input a, ::tensorflow::Input b, ::tensorflow::Input bias, ::tensorflow::Input min_a, ::tensorflow::Input max_a, ::tensorflow::Input min_b, ::tensorflow::Input max_b, ::tensorflow::Input min_freezed_output, ::tensorflow::Input |
1890 | max_freezed_output) |
1891 | : QuantizedMatMulWithBiasAndReluAndRequantize(scope, a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, QuantizedMatMulWithBiasAndReluAndRequantize::Attrs()) {} |
1892 | |
1893 | QuantizedMatMulWithBiasAndRequantize::QuantizedMatMulWithBiasAndRequantize(const |
1894 | ::tensorflow::Scope& |
1895 | scope, |
1896 | ::tensorflow::Input |
1897 | a, |
1898 | ::tensorflow::Input |
1899 | b, |
1900 | ::tensorflow::Input |
1901 | bias, |
1902 | ::tensorflow::Input |
1903 | min_a, |
1904 | ::tensorflow::Input |
1905 | max_a, |
1906 | ::tensorflow::Input |
1907 | min_b, |
1908 | ::tensorflow::Input |
1909 | max_b, |
1910 | ::tensorflow::Input |
1911 | min_freezed_output, |
1912 | ::tensorflow::Input |
1913 | max_freezed_output, |
1914 | const |
1915 | QuantizedMatMulWithBiasAndRequantize::Attrs& |
1916 | attrs) { |
1917 | if (!scope.ok()) return; |
1918 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
1919 | if (!scope.ok()) return; |
1920 | auto _b = ::tensorflow::ops::AsNodeOut(scope, b); |
1921 | if (!scope.ok()) return; |
1922 | auto _bias = ::tensorflow::ops::AsNodeOut(scope, bias); |
1923 | if (!scope.ok()) return; |
1924 | auto _min_a = ::tensorflow::ops::AsNodeOut(scope, min_a); |
1925 | if (!scope.ok()) return; |
1926 | auto _max_a = ::tensorflow::ops::AsNodeOut(scope, max_a); |
1927 | if (!scope.ok()) return; |
1928 | auto _min_b = ::tensorflow::ops::AsNodeOut(scope, min_b); |
1929 | if (!scope.ok()) return; |
1930 | auto _max_b = ::tensorflow::ops::AsNodeOut(scope, max_b); |
1931 | if (!scope.ok()) return; |
1932 | auto _min_freezed_output = ::tensorflow::ops::AsNodeOut(scope, min_freezed_output); |
1933 | if (!scope.ok()) return; |
1934 | auto _max_freezed_output = ::tensorflow::ops::AsNodeOut(scope, max_freezed_output); |
1935 | if (!scope.ok()) return; |
1936 | ::tensorflow::Node* ret; |
1937 | const auto unique_name = scope.GetUniqueNameForOp("QuantizedMatMulWithBiasAndRequantize" ); |
1938 | auto builder = ::tensorflow::NodeBuilder(unique_name, "QuantizedMatMulWithBiasAndRequantize" ) |
1939 | .Input(_a) |
1940 | .Input(_b) |
1941 | .Input(_bias) |
1942 | .Input(_min_a) |
1943 | .Input(_max_a) |
1944 | .Input(_min_b) |
1945 | .Input(_max_b) |
1946 | .Input(_min_freezed_output) |
1947 | .Input(_max_freezed_output) |
1948 | .Attr("Toutput" , attrs.Toutput_) |
1949 | .Attr("transpose_a" , attrs.transpose_a_) |
1950 | .Attr("transpose_b" , attrs.transpose_b_) |
1951 | .Attr("input_quant_mode" , attrs.input_quant_mode_) |
1952 | ; |
1953 | scope.UpdateBuilder(&builder); |
1954 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
1955 | if (!scope.ok()) return; |
1956 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
1957 | this->operation = Operation(ret); |
1958 | ::tensorflow::NameRangeMap _outputs_range; |
1959 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
1960 | if (!_status_.ok()) { |
1961 | scope.UpdateStatus(_status_); |
1962 | return; |
1963 | } |
1964 | |
1965 | this->out = Output(ret, _outputs_range["out" ].first); |
1966 | this->min_out = Output(ret, _outputs_range["min_out" ].first); |
1967 | this->max_out = Output(ret, _outputs_range["max_out" ].first); |
1968 | } |
1969 | |
1970 | QuantizedMatMulWithBiasAndRequantize::QuantizedMatMulWithBiasAndRequantize(const |
1971 | ::tensorflow::Scope& |
1972 | scope, |
1973 | ::tensorflow::Input |
1974 | a, |
1975 | ::tensorflow::Input |
1976 | b, |
1977 | ::tensorflow::Input |
1978 | bias, |
1979 | ::tensorflow::Input |
1980 | min_a, |
1981 | ::tensorflow::Input |
1982 | max_a, |
1983 | ::tensorflow::Input |
1984 | min_b, |
1985 | ::tensorflow::Input |
1986 | max_b, |
1987 | ::tensorflow::Input |
1988 | min_freezed_output, |
1989 | ::tensorflow::Input |
1990 | max_freezed_output) |
1991 | : QuantizedMatMulWithBiasAndRequantize(scope, a, b, bias, min_a, max_a, min_b, max_b, min_freezed_output, max_freezed_output, QuantizedMatMulWithBiasAndRequantize::Attrs()) {} |
1992 | |
1993 | Relu6Grad::Relu6Grad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
1994 | gradients, ::tensorflow::Input features) { |
1995 | if (!scope.ok()) return; |
1996 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
1997 | if (!scope.ok()) return; |
1998 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
1999 | if (!scope.ok()) return; |
2000 | ::tensorflow::Node* ret; |
2001 | const auto unique_name = scope.GetUniqueNameForOp("Relu6Grad" ); |
2002 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Relu6Grad" ) |
2003 | .Input(_gradients) |
2004 | .Input(_features) |
2005 | ; |
2006 | scope.UpdateBuilder(&builder); |
2007 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2008 | if (!scope.ok()) return; |
2009 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2010 | this->operation = Operation(ret); |
2011 | this->backprops = Output(ret, 0); |
2012 | } |
2013 | |
2014 | ReluGrad::ReluGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2015 | gradients, ::tensorflow::Input features) { |
2016 | if (!scope.ok()) return; |
2017 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
2018 | if (!scope.ok()) return; |
2019 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
2020 | if (!scope.ok()) return; |
2021 | ::tensorflow::Node* ret; |
2022 | const auto unique_name = scope.GetUniqueNameForOp("ReluGrad" ); |
2023 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReluGrad" ) |
2024 | .Input(_gradients) |
2025 | .Input(_features) |
2026 | ; |
2027 | scope.UpdateBuilder(&builder); |
2028 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2029 | if (!scope.ok()) return; |
2030 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2031 | this->operation = Operation(ret); |
2032 | this->backprops = Output(ret, 0); |
2033 | } |
2034 | |
2035 | SeluGrad::SeluGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
2036 | gradients, ::tensorflow::Input outputs) { |
2037 | if (!scope.ok()) return; |
2038 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
2039 | if (!scope.ok()) return; |
2040 | auto _outputs = ::tensorflow::ops::AsNodeOut(scope, outputs); |
2041 | if (!scope.ok()) return; |
2042 | ::tensorflow::Node* ret; |
2043 | const auto unique_name = scope.GetUniqueNameForOp("SeluGrad" ); |
2044 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SeluGrad" ) |
2045 | .Input(_gradients) |
2046 | .Input(_outputs) |
2047 | ; |
2048 | scope.UpdateBuilder(&builder); |
2049 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2050 | if (!scope.ok()) return; |
2051 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2052 | this->operation = Operation(ret); |
2053 | this->backprops = Output(ret, 0); |
2054 | } |
2055 | |
2056 | SoftplusGrad::SoftplusGrad(const ::tensorflow::Scope& scope, |
2057 | ::tensorflow::Input gradients, ::tensorflow::Input |
2058 | features) { |
2059 | if (!scope.ok()) return; |
2060 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
2061 | if (!scope.ok()) return; |
2062 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
2063 | if (!scope.ok()) return; |
2064 | ::tensorflow::Node* ret; |
2065 | const auto unique_name = scope.GetUniqueNameForOp("SoftplusGrad" ); |
2066 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SoftplusGrad" ) |
2067 | .Input(_gradients) |
2068 | .Input(_features) |
2069 | ; |
2070 | scope.UpdateBuilder(&builder); |
2071 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
2072 | if (!scope.ok()) return; |
2073 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
2074 | this->operation = Operation(ret); |
2075 | this->backprops = Output(ret, 0); |
2076 | } |
2077 | |
2078 | SoftsignGrad::SoftsignGrad(const ::tensorflow::Scope& scope, |
2079 | ::tensorflow::Input gradients, ::tensorflow::Input |
2080 | features) { |
2081 | if (!scope.ok()) return; |
2082 | auto _gradients = ::tensorflow::ops::AsNodeOut(scope, gradients); |
2083 | if (!scope.ok()) return; |
2084 | auto _features = ::tensorflow::ops::AsNodeOut(scope, features); |
2085 | if (!scope.ok()) return; |
2086 | ::tensorflow::Node* ret; |
2087 | const auto unique_name = scope.GetUniqueNameForOp("SoftsignGrad" ); |
2088 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SoftsignGrad" ) |
2089 | .Input(_gradients) |
2090 | .Input(_features) |
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->backprops = Output(ret, 0); |
2098 | } |
2099 | |
2100 | } // namespace internal |
2101 | } // namespace ops |
2102 | } // namespace tensorflow |
2103 | |