1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/math_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 | CumulativeLogsumexp::CumulativeLogsumexp(const ::tensorflow::Scope& scope, |
14 | ::tensorflow::Input x, |
15 | ::tensorflow::Input axis, const |
16 | CumulativeLogsumexp::Attrs& attrs) { |
17 | if (!scope.ok()) return; |
18 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
19 | if (!scope.ok()) return; |
20 | auto _axis = ::tensorflow::ops::AsNodeOut(scope, axis); |
21 | if (!scope.ok()) return; |
22 | ::tensorflow::Node* ret; |
23 | const auto unique_name = scope.GetUniqueNameForOp("CumulativeLogsumexp" ); |
24 | auto builder = ::tensorflow::NodeBuilder(unique_name, "CumulativeLogsumexp" ) |
25 | .Input(_x) |
26 | .Input(_axis) |
27 | .Attr("exclusive" , attrs.exclusive_) |
28 | .Attr("reverse" , attrs.reverse_) |
29 | ; |
30 | scope.UpdateBuilder(&builder); |
31 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
32 | if (!scope.ok()) return; |
33 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
34 | this->operation = Operation(ret); |
35 | this->out = Output(ret, 0); |
36 | } |
37 | |
38 | CumulativeLogsumexp::CumulativeLogsumexp(const ::tensorflow::Scope& scope, |
39 | ::tensorflow::Input x, |
40 | ::tensorflow::Input axis) |
41 | : CumulativeLogsumexp(scope, x, axis, CumulativeLogsumexp::Attrs()) {} |
42 | |
43 | IgammaGradA::IgammaGradA(const ::tensorflow::Scope& scope, ::tensorflow::Input |
44 | a, ::tensorflow::Input x) { |
45 | if (!scope.ok()) return; |
46 | auto _a = ::tensorflow::ops::AsNodeOut(scope, a); |
47 | if (!scope.ok()) return; |
48 | auto _x = ::tensorflow::ops::AsNodeOut(scope, x); |
49 | if (!scope.ok()) return; |
50 | ::tensorflow::Node* ret; |
51 | const auto unique_name = scope.GetUniqueNameForOp("IgammaGradA" ); |
52 | auto builder = ::tensorflow::NodeBuilder(unique_name, "IgammaGradA" ) |
53 | .Input(_a) |
54 | .Input(_x) |
55 | ; |
56 | scope.UpdateBuilder(&builder); |
57 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
58 | if (!scope.ok()) return; |
59 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
60 | this->operation = Operation(ret); |
61 | this->z = Output(ret, 0); |
62 | } |
63 | |
64 | InvGrad::InvGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input y, |
65 | ::tensorflow::Input dy) { |
66 | if (!scope.ok()) return; |
67 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
68 | if (!scope.ok()) return; |
69 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
70 | if (!scope.ok()) return; |
71 | ::tensorflow::Node* ret; |
72 | const auto unique_name = scope.GetUniqueNameForOp("InvGrad" ); |
73 | auto builder = ::tensorflow::NodeBuilder(unique_name, "InvGrad" ) |
74 | .Input(_y) |
75 | .Input(_dy) |
76 | ; |
77 | scope.UpdateBuilder(&builder); |
78 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
79 | if (!scope.ok()) return; |
80 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
81 | this->operation = Operation(ret); |
82 | this->z = Output(ret, 0); |
83 | } |
84 | |
85 | LinSpace::LinSpace(const ::tensorflow::Scope& scope, ::tensorflow::Input start, |
86 | ::tensorflow::Input stop, ::tensorflow::Input num) { |
87 | if (!scope.ok()) return; |
88 | auto _start = ::tensorflow::ops::AsNodeOut(scope, start); |
89 | if (!scope.ok()) return; |
90 | auto _stop = ::tensorflow::ops::AsNodeOut(scope, stop); |
91 | if (!scope.ok()) return; |
92 | auto _num = ::tensorflow::ops::AsNodeOut(scope, num); |
93 | if (!scope.ok()) return; |
94 | ::tensorflow::Node* ret; |
95 | const auto unique_name = scope.GetUniqueNameForOp("LinSpace" ); |
96 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LinSpace" ) |
97 | .Input(_start) |
98 | .Input(_stop) |
99 | .Input(_num) |
100 | ; |
101 | scope.UpdateBuilder(&builder); |
102 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
103 | if (!scope.ok()) return; |
104 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
105 | this->operation = Operation(ret); |
106 | this->output = Output(ret, 0); |
107 | } |
108 | |
109 | ReciprocalGrad::ReciprocalGrad(const ::tensorflow::Scope& scope, |
110 | ::tensorflow::Input y, ::tensorflow::Input dy) { |
111 | if (!scope.ok()) return; |
112 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
113 | if (!scope.ok()) return; |
114 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
115 | if (!scope.ok()) return; |
116 | ::tensorflow::Node* ret; |
117 | const auto unique_name = scope.GetUniqueNameForOp("ReciprocalGrad" ); |
118 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReciprocalGrad" ) |
119 | .Input(_y) |
120 | .Input(_dy) |
121 | ; |
122 | scope.UpdateBuilder(&builder); |
123 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
124 | if (!scope.ok()) return; |
125 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
126 | this->operation = Operation(ret); |
127 | this->z = Output(ret, 0); |
128 | } |
129 | |
130 | RequantizationRangePerChannel::RequantizationRangePerChannel(const |
131 | ::tensorflow::Scope& |
132 | scope, |
133 | ::tensorflow::Input |
134 | input, |
135 | ::tensorflow::Input |
136 | input_min, |
137 | ::tensorflow::Input |
138 | input_max, float |
139 | clip_value_max) { |
140 | if (!scope.ok()) return; |
141 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
142 | if (!scope.ok()) return; |
143 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
144 | if (!scope.ok()) return; |
145 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
146 | if (!scope.ok()) return; |
147 | ::tensorflow::Node* ret; |
148 | const auto unique_name = scope.GetUniqueNameForOp("RequantizationRangePerChannel" ); |
149 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RequantizationRangePerChannel" ) |
150 | .Input(_input) |
151 | .Input(_input_min) |
152 | .Input(_input_max) |
153 | .Attr("clip_value_max" , clip_value_max) |
154 | ; |
155 | scope.UpdateBuilder(&builder); |
156 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
157 | if (!scope.ok()) return; |
158 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
159 | this->operation = Operation(ret); |
160 | ::tensorflow::NameRangeMap _outputs_range; |
161 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
162 | if (!_status_.ok()) { |
163 | scope.UpdateStatus(_status_); |
164 | return; |
165 | } |
166 | |
167 | this->output_min = Output(ret, _outputs_range["output_min" ].first); |
168 | this->output_max = Output(ret, _outputs_range["output_max" ].first); |
169 | } |
170 | |
171 | RequantizePerChannel::RequantizePerChannel(const ::tensorflow::Scope& scope, |
172 | ::tensorflow::Input input, |
173 | ::tensorflow::Input input_min, |
174 | ::tensorflow::Input input_max, |
175 | ::tensorflow::Input |
176 | requested_output_min, |
177 | ::tensorflow::Input |
178 | requested_output_max, const |
179 | RequantizePerChannel::Attrs& attrs) { |
180 | if (!scope.ok()) return; |
181 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
182 | if (!scope.ok()) return; |
183 | auto _input_min = ::tensorflow::ops::AsNodeOut(scope, input_min); |
184 | if (!scope.ok()) return; |
185 | auto _input_max = ::tensorflow::ops::AsNodeOut(scope, input_max); |
186 | if (!scope.ok()) return; |
187 | auto _requested_output_min = ::tensorflow::ops::AsNodeOut(scope, requested_output_min); |
188 | if (!scope.ok()) return; |
189 | auto _requested_output_max = ::tensorflow::ops::AsNodeOut(scope, requested_output_max); |
190 | if (!scope.ok()) return; |
191 | ::tensorflow::Node* ret; |
192 | const auto unique_name = scope.GetUniqueNameForOp("RequantizePerChannel" ); |
193 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RequantizePerChannel" ) |
194 | .Input(_input) |
195 | .Input(_input_min) |
196 | .Input(_input_max) |
197 | .Input(_requested_output_min) |
198 | .Input(_requested_output_max) |
199 | .Attr("out_type" , attrs.out_type_) |
200 | ; |
201 | scope.UpdateBuilder(&builder); |
202 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
203 | if (!scope.ok()) return; |
204 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
205 | this->operation = Operation(ret); |
206 | ::tensorflow::NameRangeMap _outputs_range; |
207 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
208 | if (!_status_.ok()) { |
209 | scope.UpdateStatus(_status_); |
210 | return; |
211 | } |
212 | |
213 | this->output = Output(ret, _outputs_range["output" ].first); |
214 | this->output_min = Output(ret, _outputs_range["output_min" ].first); |
215 | this->output_max = Output(ret, _outputs_range["output_max" ].first); |
216 | } |
217 | |
218 | RequantizePerChannel::RequantizePerChannel(const ::tensorflow::Scope& scope, |
219 | ::tensorflow::Input input, |
220 | ::tensorflow::Input input_min, |
221 | ::tensorflow::Input input_max, |
222 | ::tensorflow::Input |
223 | requested_output_min, |
224 | ::tensorflow::Input |
225 | requested_output_max) |
226 | : RequantizePerChannel(scope, input, input_min, input_max, requested_output_min, requested_output_max, RequantizePerChannel::Attrs()) {} |
227 | |
228 | RsqrtGrad::RsqrtGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input y, |
229 | ::tensorflow::Input dy) { |
230 | if (!scope.ok()) return; |
231 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
232 | if (!scope.ok()) return; |
233 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
234 | if (!scope.ok()) return; |
235 | ::tensorflow::Node* ret; |
236 | const auto unique_name = scope.GetUniqueNameForOp("RsqrtGrad" ); |
237 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RsqrtGrad" ) |
238 | .Input(_y) |
239 | .Input(_dy) |
240 | ; |
241 | scope.UpdateBuilder(&builder); |
242 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
243 | if (!scope.ok()) return; |
244 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
245 | this->operation = Operation(ret); |
246 | this->z = Output(ret, 0); |
247 | } |
248 | |
249 | SigmoidGrad::SigmoidGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input |
250 | y, ::tensorflow::Input dy) { |
251 | if (!scope.ok()) return; |
252 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
253 | if (!scope.ok()) return; |
254 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
255 | if (!scope.ok()) return; |
256 | ::tensorflow::Node* ret; |
257 | const auto unique_name = scope.GetUniqueNameForOp("SigmoidGrad" ); |
258 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SigmoidGrad" ) |
259 | .Input(_y) |
260 | .Input(_dy) |
261 | ; |
262 | scope.UpdateBuilder(&builder); |
263 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
264 | if (!scope.ok()) return; |
265 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
266 | this->operation = Operation(ret); |
267 | this->z = Output(ret, 0); |
268 | } |
269 | |
270 | SobolSample::SobolSample(const ::tensorflow::Scope& scope, ::tensorflow::Input |
271 | dim, ::tensorflow::Input num_results, |
272 | ::tensorflow::Input skip, const SobolSample::Attrs& |
273 | attrs) { |
274 | if (!scope.ok()) return; |
275 | auto _dim = ::tensorflow::ops::AsNodeOut(scope, dim); |
276 | if (!scope.ok()) return; |
277 | auto _num_results = ::tensorflow::ops::AsNodeOut(scope, num_results); |
278 | if (!scope.ok()) return; |
279 | auto _skip = ::tensorflow::ops::AsNodeOut(scope, skip); |
280 | if (!scope.ok()) return; |
281 | ::tensorflow::Node* ret; |
282 | const auto unique_name = scope.GetUniqueNameForOp("SobolSample" ); |
283 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SobolSample" ) |
284 | .Input(_dim) |
285 | .Input(_num_results) |
286 | .Input(_skip) |
287 | .Attr("dtype" , attrs.dtype_) |
288 | ; |
289 | scope.UpdateBuilder(&builder); |
290 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
291 | if (!scope.ok()) return; |
292 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
293 | this->operation = Operation(ret); |
294 | this->samples = Output(ret, 0); |
295 | } |
296 | |
297 | SobolSample::SobolSample(const ::tensorflow::Scope& scope, ::tensorflow::Input |
298 | dim, ::tensorflow::Input num_results, |
299 | ::tensorflow::Input skip) |
300 | : SobolSample(scope, dim, num_results, skip, SobolSample::Attrs()) {} |
301 | |
302 | SqrtGrad::SqrtGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input y, |
303 | ::tensorflow::Input dy) { |
304 | if (!scope.ok()) return; |
305 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
306 | if (!scope.ok()) return; |
307 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
308 | if (!scope.ok()) return; |
309 | ::tensorflow::Node* ret; |
310 | const auto unique_name = scope.GetUniqueNameForOp("SqrtGrad" ); |
311 | auto builder = ::tensorflow::NodeBuilder(unique_name, "SqrtGrad" ) |
312 | .Input(_y) |
313 | .Input(_dy) |
314 | ; |
315 | scope.UpdateBuilder(&builder); |
316 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
317 | if (!scope.ok()) return; |
318 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
319 | this->operation = Operation(ret); |
320 | this->z = Output(ret, 0); |
321 | } |
322 | |
323 | TanhGrad::TanhGrad(const ::tensorflow::Scope& scope, ::tensorflow::Input y, |
324 | ::tensorflow::Input dy) { |
325 | if (!scope.ok()) return; |
326 | auto _y = ::tensorflow::ops::AsNodeOut(scope, y); |
327 | if (!scope.ok()) return; |
328 | auto _dy = ::tensorflow::ops::AsNodeOut(scope, dy); |
329 | if (!scope.ok()) return; |
330 | ::tensorflow::Node* ret; |
331 | const auto unique_name = scope.GetUniqueNameForOp("TanhGrad" ); |
332 | auto builder = ::tensorflow::NodeBuilder(unique_name, "TanhGrad" ) |
333 | .Input(_y) |
334 | .Input(_dy) |
335 | ; |
336 | scope.UpdateBuilder(&builder); |
337 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
338 | if (!scope.ok()) return; |
339 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
340 | this->operation = Operation(ret); |
341 | this->z = Output(ret, 0); |
342 | } |
343 | |
344 | } // namespace internal |
345 | } // namespace ops |
346 | } // namespace tensorflow |
347 | |