1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/sparse_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10AddManySparseToTensorsMap::AddManySparseToTensorsMap(const ::tensorflow::Scope&
11 scope, ::tensorflow::Input
12 sparse_indices,
13 ::tensorflow::Input
14 sparse_values,
15 ::tensorflow::Input
16 sparse_shape, const
17 AddManySparseToTensorsMap::Attrs&
18 attrs) {
19 if (!scope.ok()) return;
20 auto _sparse_indices = ::tensorflow::ops::AsNodeOut(scope, sparse_indices);
21 if (!scope.ok()) return;
22 auto _sparse_values = ::tensorflow::ops::AsNodeOut(scope, sparse_values);
23 if (!scope.ok()) return;
24 auto _sparse_shape = ::tensorflow::ops::AsNodeOut(scope, sparse_shape);
25 if (!scope.ok()) return;
26 ::tensorflow::Node* ret;
27 const auto unique_name = scope.GetUniqueNameForOp("AddManySparseToTensorsMap");
28 auto builder = ::tensorflow::NodeBuilder(unique_name, "AddManySparseToTensorsMap")
29 .Input(_sparse_indices)
30 .Input(_sparse_values)
31 .Input(_sparse_shape)
32 .Attr("container", attrs.container_)
33 .Attr("shared_name", attrs.shared_name_)
34 ;
35 scope.UpdateBuilder(&builder);
36 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
37 if (!scope.ok()) return;
38 scope.UpdateStatus(scope.DoShapeInference(ret));
39 this->operation = Operation(ret);
40 this->sparse_handles = Output(ret, 0);
41}
42
43AddManySparseToTensorsMap::AddManySparseToTensorsMap(const ::tensorflow::Scope&
44 scope, ::tensorflow::Input
45 sparse_indices,
46 ::tensorflow::Input
47 sparse_values,
48 ::tensorflow::Input
49 sparse_shape)
50 : AddManySparseToTensorsMap(scope, sparse_indices, sparse_values, sparse_shape, AddManySparseToTensorsMap::Attrs()) {}
51
52AddSparseToTensorsMap::AddSparseToTensorsMap(const ::tensorflow::Scope& scope,
53 ::tensorflow::Input
54 sparse_indices,
55 ::tensorflow::Input sparse_values,
56 ::tensorflow::Input sparse_shape,
57 const
58 AddSparseToTensorsMap::Attrs&
59 attrs) {
60 if (!scope.ok()) return;
61 auto _sparse_indices = ::tensorflow::ops::AsNodeOut(scope, sparse_indices);
62 if (!scope.ok()) return;
63 auto _sparse_values = ::tensorflow::ops::AsNodeOut(scope, sparse_values);
64 if (!scope.ok()) return;
65 auto _sparse_shape = ::tensorflow::ops::AsNodeOut(scope, sparse_shape);
66 if (!scope.ok()) return;
67 ::tensorflow::Node* ret;
68 const auto unique_name = scope.GetUniqueNameForOp("AddSparseToTensorsMap");
69 auto builder = ::tensorflow::NodeBuilder(unique_name, "AddSparseToTensorsMap")
70 .Input(_sparse_indices)
71 .Input(_sparse_values)
72 .Input(_sparse_shape)
73 .Attr("container", attrs.container_)
74 .Attr("shared_name", attrs.shared_name_)
75 ;
76 scope.UpdateBuilder(&builder);
77 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
78 if (!scope.ok()) return;
79 scope.UpdateStatus(scope.DoShapeInference(ret));
80 this->operation = Operation(ret);
81 this->sparse_handle = Output(ret, 0);
82}
83
84AddSparseToTensorsMap::AddSparseToTensorsMap(const ::tensorflow::Scope& scope,
85 ::tensorflow::Input
86 sparse_indices,
87 ::tensorflow::Input sparse_values,
88 ::tensorflow::Input sparse_shape)
89 : AddSparseToTensorsMap(scope, sparse_indices, sparse_values, sparse_shape, AddSparseToTensorsMap::Attrs()) {}
90
91DeserializeManySparse::DeserializeManySparse(const ::tensorflow::Scope& scope,
92 ::tensorflow::Input
93 serialized_sparse, DataType dtype) {
94 if (!scope.ok()) return;
95 auto _serialized_sparse = ::tensorflow::ops::AsNodeOut(scope, serialized_sparse);
96 if (!scope.ok()) return;
97 ::tensorflow::Node* ret;
98 const auto unique_name = scope.GetUniqueNameForOp("DeserializeManySparse");
99 auto builder = ::tensorflow::NodeBuilder(unique_name, "DeserializeManySparse")
100 .Input(_serialized_sparse)
101 .Attr("dtype", dtype)
102 ;
103 scope.UpdateBuilder(&builder);
104 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
105 if (!scope.ok()) return;
106 scope.UpdateStatus(scope.DoShapeInference(ret));
107 this->operation = Operation(ret);
108 ::tensorflow::NameRangeMap _outputs_range;
109 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
110 if (!_status_.ok()) {
111 scope.UpdateStatus(_status_);
112 return;
113 }
114
115 this->sparse_indices = Output(ret, _outputs_range["sparse_indices"].first);
116 this->sparse_values = Output(ret, _outputs_range["sparse_values"].first);
117 this->sparse_shape = Output(ret, _outputs_range["sparse_shape"].first);
118}
119
120DeserializeSparse::DeserializeSparse(const ::tensorflow::Scope& scope,
121 ::tensorflow::Input serialized_sparse,
122 DataType dtype) {
123 if (!scope.ok()) return;
124 auto _serialized_sparse = ::tensorflow::ops::AsNodeOut(scope, serialized_sparse);
125 if (!scope.ok()) return;
126 ::tensorflow::Node* ret;
127 const auto unique_name = scope.GetUniqueNameForOp("DeserializeSparse");
128 auto builder = ::tensorflow::NodeBuilder(unique_name, "DeserializeSparse")
129 .Input(_serialized_sparse)
130 .Attr("dtype", dtype)
131 ;
132 scope.UpdateBuilder(&builder);
133 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
134 if (!scope.ok()) return;
135 scope.UpdateStatus(scope.DoShapeInference(ret));
136 this->operation = Operation(ret);
137 ::tensorflow::NameRangeMap _outputs_range;
138 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
139 if (!_status_.ok()) {
140 scope.UpdateStatus(_status_);
141 return;
142 }
143
144 this->sparse_indices = Output(ret, _outputs_range["sparse_indices"].first);
145 this->sparse_values = Output(ret, _outputs_range["sparse_values"].first);
146 this->sparse_shape = Output(ret, _outputs_range["sparse_shape"].first);
147}
148
149SerializeManySparse::SerializeManySparse(const ::tensorflow::Scope& scope,
150 ::tensorflow::Input sparse_indices,
151 ::tensorflow::Input sparse_values,
152 ::tensorflow::Input sparse_shape,
153 const SerializeManySparse::Attrs&
154 attrs) {
155 if (!scope.ok()) return;
156 auto _sparse_indices = ::tensorflow::ops::AsNodeOut(scope, sparse_indices);
157 if (!scope.ok()) return;
158 auto _sparse_values = ::tensorflow::ops::AsNodeOut(scope, sparse_values);
159 if (!scope.ok()) return;
160 auto _sparse_shape = ::tensorflow::ops::AsNodeOut(scope, sparse_shape);
161 if (!scope.ok()) return;
162 ::tensorflow::Node* ret;
163 const auto unique_name = scope.GetUniqueNameForOp("SerializeManySparse");
164 auto builder = ::tensorflow::NodeBuilder(unique_name, "SerializeManySparse")
165 .Input(_sparse_indices)
166 .Input(_sparse_values)
167 .Input(_sparse_shape)
168 .Attr("out_type", attrs.out_type_)
169 ;
170 scope.UpdateBuilder(&builder);
171 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
172 if (!scope.ok()) return;
173 scope.UpdateStatus(scope.DoShapeInference(ret));
174 this->operation = Operation(ret);
175 this->serialized_sparse = Output(ret, 0);
176}
177
178SerializeManySparse::SerializeManySparse(const ::tensorflow::Scope& scope,
179 ::tensorflow::Input sparse_indices,
180 ::tensorflow::Input sparse_values,
181 ::tensorflow::Input sparse_shape)
182 : SerializeManySparse(scope, sparse_indices, sparse_values, sparse_shape, SerializeManySparse::Attrs()) {}
183
184SerializeSparse::SerializeSparse(const ::tensorflow::Scope& scope,
185 ::tensorflow::Input sparse_indices,
186 ::tensorflow::Input sparse_values,
187 ::tensorflow::Input sparse_shape, const
188 SerializeSparse::Attrs& attrs) {
189 if (!scope.ok()) return;
190 auto _sparse_indices = ::tensorflow::ops::AsNodeOut(scope, sparse_indices);
191 if (!scope.ok()) return;
192 auto _sparse_values = ::tensorflow::ops::AsNodeOut(scope, sparse_values);
193 if (!scope.ok()) return;
194 auto _sparse_shape = ::tensorflow::ops::AsNodeOut(scope, sparse_shape);
195 if (!scope.ok()) return;
196 ::tensorflow::Node* ret;
197 const auto unique_name = scope.GetUniqueNameForOp("SerializeSparse");
198 auto builder = ::tensorflow::NodeBuilder(unique_name, "SerializeSparse")
199 .Input(_sparse_indices)
200 .Input(_sparse_values)
201 .Input(_sparse_shape)
202 .Attr("out_type", attrs.out_type_)
203 ;
204 scope.UpdateBuilder(&builder);
205 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
206 if (!scope.ok()) return;
207 scope.UpdateStatus(scope.DoShapeInference(ret));
208 this->operation = Operation(ret);
209 this->serialized_sparse = Output(ret, 0);
210}
211
212SerializeSparse::SerializeSparse(const ::tensorflow::Scope& scope,
213 ::tensorflow::Input sparse_indices,
214 ::tensorflow::Input sparse_values,
215 ::tensorflow::Input sparse_shape)
216 : SerializeSparse(scope, sparse_indices, sparse_values, sparse_shape, SerializeSparse::Attrs()) {}
217
218SparseAdd::SparseAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input
219 a_indices, ::tensorflow::Input a_values,
220 ::tensorflow::Input a_shape, ::tensorflow::Input
221 b_indices, ::tensorflow::Input b_values,
222 ::tensorflow::Input b_shape, ::tensorflow::Input thresh) {
223 if (!scope.ok()) return;
224 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
225 if (!scope.ok()) return;
226 auto _a_values = ::tensorflow::ops::AsNodeOut(scope, a_values);
227 if (!scope.ok()) return;
228 auto _a_shape = ::tensorflow::ops::AsNodeOut(scope, a_shape);
229 if (!scope.ok()) return;
230 auto _b_indices = ::tensorflow::ops::AsNodeOut(scope, b_indices);
231 if (!scope.ok()) return;
232 auto _b_values = ::tensorflow::ops::AsNodeOut(scope, b_values);
233 if (!scope.ok()) return;
234 auto _b_shape = ::tensorflow::ops::AsNodeOut(scope, b_shape);
235 if (!scope.ok()) return;
236 auto _thresh = ::tensorflow::ops::AsNodeOut(scope, thresh);
237 if (!scope.ok()) return;
238 ::tensorflow::Node* ret;
239 const auto unique_name = scope.GetUniqueNameForOp("SparseAdd");
240 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseAdd")
241 .Input(_a_indices)
242 .Input(_a_values)
243 .Input(_a_shape)
244 .Input(_b_indices)
245 .Input(_b_values)
246 .Input(_b_shape)
247 .Input(_thresh)
248 ;
249 scope.UpdateBuilder(&builder);
250 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
251 if (!scope.ok()) return;
252 scope.UpdateStatus(scope.DoShapeInference(ret));
253 this->operation = Operation(ret);
254 ::tensorflow::NameRangeMap _outputs_range;
255 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
256 if (!_status_.ok()) {
257 scope.UpdateStatus(_status_);
258 return;
259 }
260
261 this->sum_indices = Output(ret, _outputs_range["sum_indices"].first);
262 this->sum_values = Output(ret, _outputs_range["sum_values"].first);
263 this->sum_shape = Output(ret, _outputs_range["sum_shape"].first);
264}
265
266SparseAddGrad::SparseAddGrad(const ::tensorflow::Scope& scope,
267 ::tensorflow::Input backprop_val_grad,
268 ::tensorflow::Input a_indices, ::tensorflow::Input
269 b_indices, ::tensorflow::Input sum_indices) {
270 if (!scope.ok()) return;
271 auto _backprop_val_grad = ::tensorflow::ops::AsNodeOut(scope, backprop_val_grad);
272 if (!scope.ok()) return;
273 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
274 if (!scope.ok()) return;
275 auto _b_indices = ::tensorflow::ops::AsNodeOut(scope, b_indices);
276 if (!scope.ok()) return;
277 auto _sum_indices = ::tensorflow::ops::AsNodeOut(scope, sum_indices);
278 if (!scope.ok()) return;
279 ::tensorflow::Node* ret;
280 const auto unique_name = scope.GetUniqueNameForOp("SparseAddGrad");
281 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseAddGrad")
282 .Input(_backprop_val_grad)
283 .Input(_a_indices)
284 .Input(_b_indices)
285 .Input(_sum_indices)
286 ;
287 scope.UpdateBuilder(&builder);
288 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
289 if (!scope.ok()) return;
290 scope.UpdateStatus(scope.DoShapeInference(ret));
291 this->operation = Operation(ret);
292 ::tensorflow::NameRangeMap _outputs_range;
293 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
294 if (!_status_.ok()) {
295 scope.UpdateStatus(_status_);
296 return;
297 }
298
299 this->a_val_grad = Output(ret, _outputs_range["a_val_grad"].first);
300 this->b_val_grad = Output(ret, _outputs_range["b_val_grad"].first);
301}
302
303SparseConcat::SparseConcat(const ::tensorflow::Scope& scope,
304 ::tensorflow::InputList indices,
305 ::tensorflow::InputList values,
306 ::tensorflow::InputList shapes, int64 concat_dim) {
307 if (!scope.ok()) return;
308 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
309 if (!scope.ok()) return;
310 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
311 if (!scope.ok()) return;
312 auto _shapes = ::tensorflow::ops::AsNodeOutList(scope, shapes);
313 if (!scope.ok()) return;
314 ::tensorflow::Node* ret;
315 const auto unique_name = scope.GetUniqueNameForOp("SparseConcat");
316 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseConcat")
317 .Input(_indices)
318 .Input(_values)
319 .Input(_shapes)
320 .Attr("concat_dim", concat_dim)
321 ;
322 scope.UpdateBuilder(&builder);
323 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
324 if (!scope.ok()) return;
325 scope.UpdateStatus(scope.DoShapeInference(ret));
326 this->operation = Operation(ret);
327 ::tensorflow::NameRangeMap _outputs_range;
328 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
329 if (!_status_.ok()) {
330 scope.UpdateStatus(_status_);
331 return;
332 }
333
334 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
335 this->output_values = Output(ret, _outputs_range["output_values"].first);
336 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
337}
338
339SparseCross::SparseCross(const ::tensorflow::Scope& scope,
340 ::tensorflow::InputList indices,
341 ::tensorflow::InputList values,
342 ::tensorflow::InputList shapes,
343 ::tensorflow::InputList dense_inputs, bool
344 hashed_output, int64 num_buckets, int64 hash_key,
345 DataType out_type, DataType internal_type) {
346 if (!scope.ok()) return;
347 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
348 if (!scope.ok()) return;
349 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
350 if (!scope.ok()) return;
351 auto _shapes = ::tensorflow::ops::AsNodeOutList(scope, shapes);
352 if (!scope.ok()) return;
353 auto _dense_inputs = ::tensorflow::ops::AsNodeOutList(scope, dense_inputs);
354 if (!scope.ok()) return;
355 ::tensorflow::Node* ret;
356 const auto unique_name = scope.GetUniqueNameForOp("SparseCross");
357 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseCross")
358 .Input(_indices)
359 .Input(_values)
360 .Input(_shapes)
361 .Input(_dense_inputs)
362 .Attr("hashed_output", hashed_output)
363 .Attr("num_buckets", num_buckets)
364 .Attr("hash_key", hash_key)
365 .Attr("out_type", out_type)
366 .Attr("internal_type", internal_type)
367 ;
368 scope.UpdateBuilder(&builder);
369 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
370 if (!scope.ok()) return;
371 scope.UpdateStatus(scope.DoShapeInference(ret));
372 this->operation = Operation(ret);
373 ::tensorflow::NameRangeMap _outputs_range;
374 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
375 if (!_status_.ok()) {
376 scope.UpdateStatus(_status_);
377 return;
378 }
379
380 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
381 this->output_values = Output(ret, _outputs_range["output_values"].first);
382 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
383}
384
385SparseCrossHashed::SparseCrossHashed(const ::tensorflow::Scope& scope,
386 ::tensorflow::InputList indices,
387 ::tensorflow::InputList values,
388 ::tensorflow::InputList shapes,
389 ::tensorflow::InputList dense_inputs,
390 ::tensorflow::Input num_buckets,
391 ::tensorflow::Input strong_hash,
392 ::tensorflow::Input salt) {
393 if (!scope.ok()) return;
394 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
395 if (!scope.ok()) return;
396 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
397 if (!scope.ok()) return;
398 auto _shapes = ::tensorflow::ops::AsNodeOutList(scope, shapes);
399 if (!scope.ok()) return;
400 auto _dense_inputs = ::tensorflow::ops::AsNodeOutList(scope, dense_inputs);
401 if (!scope.ok()) return;
402 auto _num_buckets = ::tensorflow::ops::AsNodeOut(scope, num_buckets);
403 if (!scope.ok()) return;
404 auto _strong_hash = ::tensorflow::ops::AsNodeOut(scope, strong_hash);
405 if (!scope.ok()) return;
406 auto _salt = ::tensorflow::ops::AsNodeOut(scope, salt);
407 if (!scope.ok()) return;
408 ::tensorflow::Node* ret;
409 const auto unique_name = scope.GetUniqueNameForOp("SparseCrossHashed");
410 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseCrossHashed")
411 .Input(_indices)
412 .Input(_values)
413 .Input(_shapes)
414 .Input(_dense_inputs)
415 .Input(_num_buckets)
416 .Input(_strong_hash)
417 .Input(_salt)
418 ;
419 scope.UpdateBuilder(&builder);
420 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
421 if (!scope.ok()) return;
422 scope.UpdateStatus(scope.DoShapeInference(ret));
423 this->operation = Operation(ret);
424 ::tensorflow::NameRangeMap _outputs_range;
425 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
426 if (!_status_.ok()) {
427 scope.UpdateStatus(_status_);
428 return;
429 }
430
431 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
432 this->output_values = Output(ret, _outputs_range["output_values"].first);
433 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
434}
435
436SparseCrossV2::SparseCrossV2(const ::tensorflow::Scope& scope,
437 ::tensorflow::InputList indices,
438 ::tensorflow::InputList values,
439 ::tensorflow::InputList shapes,
440 ::tensorflow::InputList dense_inputs,
441 ::tensorflow::Input sep) {
442 if (!scope.ok()) return;
443 auto _indices = ::tensorflow::ops::AsNodeOutList(scope, indices);
444 if (!scope.ok()) return;
445 auto _values = ::tensorflow::ops::AsNodeOutList(scope, values);
446 if (!scope.ok()) return;
447 auto _shapes = ::tensorflow::ops::AsNodeOutList(scope, shapes);
448 if (!scope.ok()) return;
449 auto _dense_inputs = ::tensorflow::ops::AsNodeOutList(scope, dense_inputs);
450 if (!scope.ok()) return;
451 auto _sep = ::tensorflow::ops::AsNodeOut(scope, sep);
452 if (!scope.ok()) return;
453 ::tensorflow::Node* ret;
454 const auto unique_name = scope.GetUniqueNameForOp("SparseCrossV2");
455 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseCrossV2")
456 .Input(_indices)
457 .Input(_values)
458 .Input(_shapes)
459 .Input(_dense_inputs)
460 .Input(_sep)
461 ;
462 scope.UpdateBuilder(&builder);
463 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
464 if (!scope.ok()) return;
465 scope.UpdateStatus(scope.DoShapeInference(ret));
466 this->operation = Operation(ret);
467 ::tensorflow::NameRangeMap _outputs_range;
468 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
469 if (!_status_.ok()) {
470 scope.UpdateStatus(_status_);
471 return;
472 }
473
474 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
475 this->output_values = Output(ret, _outputs_range["output_values"].first);
476 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
477}
478
479SparseDenseCwiseAdd::SparseDenseCwiseAdd(const ::tensorflow::Scope& scope,
480 ::tensorflow::Input sp_indices,
481 ::tensorflow::Input sp_values,
482 ::tensorflow::Input sp_shape,
483 ::tensorflow::Input dense) {
484 if (!scope.ok()) return;
485 auto _sp_indices = ::tensorflow::ops::AsNodeOut(scope, sp_indices);
486 if (!scope.ok()) return;
487 auto _sp_values = ::tensorflow::ops::AsNodeOut(scope, sp_values);
488 if (!scope.ok()) return;
489 auto _sp_shape = ::tensorflow::ops::AsNodeOut(scope, sp_shape);
490 if (!scope.ok()) return;
491 auto _dense = ::tensorflow::ops::AsNodeOut(scope, dense);
492 if (!scope.ok()) return;
493 ::tensorflow::Node* ret;
494 const auto unique_name = scope.GetUniqueNameForOp("SparseDenseCwiseAdd");
495 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseDenseCwiseAdd")
496 .Input(_sp_indices)
497 .Input(_sp_values)
498 .Input(_sp_shape)
499 .Input(_dense)
500 ;
501 scope.UpdateBuilder(&builder);
502 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
503 if (!scope.ok()) return;
504 scope.UpdateStatus(scope.DoShapeInference(ret));
505 this->operation = Operation(ret);
506 this->output = Output(ret, 0);
507}
508
509SparseDenseCwiseDiv::SparseDenseCwiseDiv(const ::tensorflow::Scope& scope,
510 ::tensorflow::Input sp_indices,
511 ::tensorflow::Input sp_values,
512 ::tensorflow::Input sp_shape,
513 ::tensorflow::Input dense) {
514 if (!scope.ok()) return;
515 auto _sp_indices = ::tensorflow::ops::AsNodeOut(scope, sp_indices);
516 if (!scope.ok()) return;
517 auto _sp_values = ::tensorflow::ops::AsNodeOut(scope, sp_values);
518 if (!scope.ok()) return;
519 auto _sp_shape = ::tensorflow::ops::AsNodeOut(scope, sp_shape);
520 if (!scope.ok()) return;
521 auto _dense = ::tensorflow::ops::AsNodeOut(scope, dense);
522 if (!scope.ok()) return;
523 ::tensorflow::Node* ret;
524 const auto unique_name = scope.GetUniqueNameForOp("SparseDenseCwiseDiv");
525 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseDenseCwiseDiv")
526 .Input(_sp_indices)
527 .Input(_sp_values)
528 .Input(_sp_shape)
529 .Input(_dense)
530 ;
531 scope.UpdateBuilder(&builder);
532 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
533 if (!scope.ok()) return;
534 scope.UpdateStatus(scope.DoShapeInference(ret));
535 this->operation = Operation(ret);
536 this->output = Output(ret, 0);
537}
538
539SparseDenseCwiseMul::SparseDenseCwiseMul(const ::tensorflow::Scope& scope,
540 ::tensorflow::Input sp_indices,
541 ::tensorflow::Input sp_values,
542 ::tensorflow::Input sp_shape,
543 ::tensorflow::Input dense) {
544 if (!scope.ok()) return;
545 auto _sp_indices = ::tensorflow::ops::AsNodeOut(scope, sp_indices);
546 if (!scope.ok()) return;
547 auto _sp_values = ::tensorflow::ops::AsNodeOut(scope, sp_values);
548 if (!scope.ok()) return;
549 auto _sp_shape = ::tensorflow::ops::AsNodeOut(scope, sp_shape);
550 if (!scope.ok()) return;
551 auto _dense = ::tensorflow::ops::AsNodeOut(scope, dense);
552 if (!scope.ok()) return;
553 ::tensorflow::Node* ret;
554 const auto unique_name = scope.GetUniqueNameForOp("SparseDenseCwiseMul");
555 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseDenseCwiseMul")
556 .Input(_sp_indices)
557 .Input(_sp_values)
558 .Input(_sp_shape)
559 .Input(_dense)
560 ;
561 scope.UpdateBuilder(&builder);
562 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
563 if (!scope.ok()) return;
564 scope.UpdateStatus(scope.DoShapeInference(ret));
565 this->operation = Operation(ret);
566 this->output = Output(ret, 0);
567}
568
569SparseFillEmptyRows::SparseFillEmptyRows(const ::tensorflow::Scope& scope,
570 ::tensorflow::Input indices,
571 ::tensorflow::Input values,
572 ::tensorflow::Input dense_shape,
573 ::tensorflow::Input default_value) {
574 if (!scope.ok()) return;
575 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
576 if (!scope.ok()) return;
577 auto _values = ::tensorflow::ops::AsNodeOut(scope, values);
578 if (!scope.ok()) return;
579 auto _dense_shape = ::tensorflow::ops::AsNodeOut(scope, dense_shape);
580 if (!scope.ok()) return;
581 auto _default_value = ::tensorflow::ops::AsNodeOut(scope, default_value);
582 if (!scope.ok()) return;
583 ::tensorflow::Node* ret;
584 const auto unique_name = scope.GetUniqueNameForOp("SparseFillEmptyRows");
585 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseFillEmptyRows")
586 .Input(_indices)
587 .Input(_values)
588 .Input(_dense_shape)
589 .Input(_default_value)
590 ;
591 scope.UpdateBuilder(&builder);
592 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
593 if (!scope.ok()) return;
594 scope.UpdateStatus(scope.DoShapeInference(ret));
595 this->operation = Operation(ret);
596 ::tensorflow::NameRangeMap _outputs_range;
597 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
598 if (!_status_.ok()) {
599 scope.UpdateStatus(_status_);
600 return;
601 }
602
603 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
604 this->output_values = Output(ret, _outputs_range["output_values"].first);
605 this->empty_row_indicator = Output(ret, _outputs_range["empty_row_indicator"].first);
606 this->reverse_index_map = Output(ret, _outputs_range["reverse_index_map"].first);
607}
608
609SparseFillEmptyRowsGrad::SparseFillEmptyRowsGrad(const ::tensorflow::Scope&
610 scope, ::tensorflow::Input
611 reverse_index_map,
612 ::tensorflow::Input
613 grad_values) {
614 if (!scope.ok()) return;
615 auto _reverse_index_map = ::tensorflow::ops::AsNodeOut(scope, reverse_index_map);
616 if (!scope.ok()) return;
617 auto _grad_values = ::tensorflow::ops::AsNodeOut(scope, grad_values);
618 if (!scope.ok()) return;
619 ::tensorflow::Node* ret;
620 const auto unique_name = scope.GetUniqueNameForOp("SparseFillEmptyRowsGrad");
621 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseFillEmptyRowsGrad")
622 .Input(_reverse_index_map)
623 .Input(_grad_values)
624 ;
625 scope.UpdateBuilder(&builder);
626 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
627 if (!scope.ok()) return;
628 scope.UpdateStatus(scope.DoShapeInference(ret));
629 this->operation = Operation(ret);
630 ::tensorflow::NameRangeMap _outputs_range;
631 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
632 if (!_status_.ok()) {
633 scope.UpdateStatus(_status_);
634 return;
635 }
636
637 this->d_values = Output(ret, _outputs_range["d_values"].first);
638 this->d_default_value = Output(ret, _outputs_range["d_default_value"].first);
639}
640
641SparseReduceMax::SparseReduceMax(const ::tensorflow::Scope& scope,
642 ::tensorflow::Input input_indices,
643 ::tensorflow::Input input_values,
644 ::tensorflow::Input input_shape,
645 ::tensorflow::Input reduction_axes, const
646 SparseReduceMax::Attrs& attrs) {
647 if (!scope.ok()) return;
648 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
649 if (!scope.ok()) return;
650 auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values);
651 if (!scope.ok()) return;
652 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
653 if (!scope.ok()) return;
654 auto _reduction_axes = ::tensorflow::ops::AsNodeOut(scope, reduction_axes);
655 if (!scope.ok()) return;
656 ::tensorflow::Node* ret;
657 const auto unique_name = scope.GetUniqueNameForOp("SparseReduceMax");
658 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReduceMax")
659 .Input(_input_indices)
660 .Input(_input_values)
661 .Input(_input_shape)
662 .Input(_reduction_axes)
663 .Attr("keep_dims", attrs.keep_dims_)
664 ;
665 scope.UpdateBuilder(&builder);
666 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
667 if (!scope.ok()) return;
668 scope.UpdateStatus(scope.DoShapeInference(ret));
669 this->operation = Operation(ret);
670 this->output = Output(ret, 0);
671}
672
673SparseReduceMax::SparseReduceMax(const ::tensorflow::Scope& scope,
674 ::tensorflow::Input input_indices,
675 ::tensorflow::Input input_values,
676 ::tensorflow::Input input_shape,
677 ::tensorflow::Input reduction_axes)
678 : SparseReduceMax(scope, input_indices, input_values, input_shape, reduction_axes, SparseReduceMax::Attrs()) {}
679
680SparseReduceMaxSparse::SparseReduceMaxSparse(const ::tensorflow::Scope& scope,
681 ::tensorflow::Input input_indices,
682 ::tensorflow::Input input_values,
683 ::tensorflow::Input input_shape,
684 ::tensorflow::Input
685 reduction_axes, const
686 SparseReduceMaxSparse::Attrs&
687 attrs) {
688 if (!scope.ok()) return;
689 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
690 if (!scope.ok()) return;
691 auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values);
692 if (!scope.ok()) return;
693 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
694 if (!scope.ok()) return;
695 auto _reduction_axes = ::tensorflow::ops::AsNodeOut(scope, reduction_axes);
696 if (!scope.ok()) return;
697 ::tensorflow::Node* ret;
698 const auto unique_name = scope.GetUniqueNameForOp("SparseReduceMaxSparse");
699 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReduceMaxSparse")
700 .Input(_input_indices)
701 .Input(_input_values)
702 .Input(_input_shape)
703 .Input(_reduction_axes)
704 .Attr("keep_dims", attrs.keep_dims_)
705 ;
706 scope.UpdateBuilder(&builder);
707 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
708 if (!scope.ok()) return;
709 scope.UpdateStatus(scope.DoShapeInference(ret));
710 this->operation = Operation(ret);
711 ::tensorflow::NameRangeMap _outputs_range;
712 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
713 if (!_status_.ok()) {
714 scope.UpdateStatus(_status_);
715 return;
716 }
717
718 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
719 this->output_values = Output(ret, _outputs_range["output_values"].first);
720 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
721}
722
723SparseReduceMaxSparse::SparseReduceMaxSparse(const ::tensorflow::Scope& scope,
724 ::tensorflow::Input input_indices,
725 ::tensorflow::Input input_values,
726 ::tensorflow::Input input_shape,
727 ::tensorflow::Input
728 reduction_axes)
729 : SparseReduceMaxSparse(scope, input_indices, input_values, input_shape, reduction_axes, SparseReduceMaxSparse::Attrs()) {}
730
731SparseReduceSum::SparseReduceSum(const ::tensorflow::Scope& scope,
732 ::tensorflow::Input input_indices,
733 ::tensorflow::Input input_values,
734 ::tensorflow::Input input_shape,
735 ::tensorflow::Input reduction_axes, const
736 SparseReduceSum::Attrs& attrs) {
737 if (!scope.ok()) return;
738 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
739 if (!scope.ok()) return;
740 auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values);
741 if (!scope.ok()) return;
742 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
743 if (!scope.ok()) return;
744 auto _reduction_axes = ::tensorflow::ops::AsNodeOut(scope, reduction_axes);
745 if (!scope.ok()) return;
746 ::tensorflow::Node* ret;
747 const auto unique_name = scope.GetUniqueNameForOp("SparseReduceSum");
748 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReduceSum")
749 .Input(_input_indices)
750 .Input(_input_values)
751 .Input(_input_shape)
752 .Input(_reduction_axes)
753 .Attr("keep_dims", attrs.keep_dims_)
754 ;
755 scope.UpdateBuilder(&builder);
756 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
757 if (!scope.ok()) return;
758 scope.UpdateStatus(scope.DoShapeInference(ret));
759 this->operation = Operation(ret);
760 this->output = Output(ret, 0);
761}
762
763SparseReduceSum::SparseReduceSum(const ::tensorflow::Scope& scope,
764 ::tensorflow::Input input_indices,
765 ::tensorflow::Input input_values,
766 ::tensorflow::Input input_shape,
767 ::tensorflow::Input reduction_axes)
768 : SparseReduceSum(scope, input_indices, input_values, input_shape, reduction_axes, SparseReduceSum::Attrs()) {}
769
770SparseReduceSumSparse::SparseReduceSumSparse(const ::tensorflow::Scope& scope,
771 ::tensorflow::Input input_indices,
772 ::tensorflow::Input input_values,
773 ::tensorflow::Input input_shape,
774 ::tensorflow::Input
775 reduction_axes, const
776 SparseReduceSumSparse::Attrs&
777 attrs) {
778 if (!scope.ok()) return;
779 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
780 if (!scope.ok()) return;
781 auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values);
782 if (!scope.ok()) return;
783 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
784 if (!scope.ok()) return;
785 auto _reduction_axes = ::tensorflow::ops::AsNodeOut(scope, reduction_axes);
786 if (!scope.ok()) return;
787 ::tensorflow::Node* ret;
788 const auto unique_name = scope.GetUniqueNameForOp("SparseReduceSumSparse");
789 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReduceSumSparse")
790 .Input(_input_indices)
791 .Input(_input_values)
792 .Input(_input_shape)
793 .Input(_reduction_axes)
794 .Attr("keep_dims", attrs.keep_dims_)
795 ;
796 scope.UpdateBuilder(&builder);
797 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
798 if (!scope.ok()) return;
799 scope.UpdateStatus(scope.DoShapeInference(ret));
800 this->operation = Operation(ret);
801 ::tensorflow::NameRangeMap _outputs_range;
802 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
803 if (!_status_.ok()) {
804 scope.UpdateStatus(_status_);
805 return;
806 }
807
808 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
809 this->output_values = Output(ret, _outputs_range["output_values"].first);
810 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
811}
812
813SparseReduceSumSparse::SparseReduceSumSparse(const ::tensorflow::Scope& scope,
814 ::tensorflow::Input input_indices,
815 ::tensorflow::Input input_values,
816 ::tensorflow::Input input_shape,
817 ::tensorflow::Input
818 reduction_axes)
819 : SparseReduceSumSparse(scope, input_indices, input_values, input_shape, reduction_axes, SparseReduceSumSparse::Attrs()) {}
820
821SparseReorder::SparseReorder(const ::tensorflow::Scope& scope,
822 ::tensorflow::Input input_indices,
823 ::tensorflow::Input input_values,
824 ::tensorflow::Input input_shape) {
825 if (!scope.ok()) return;
826 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
827 if (!scope.ok()) return;
828 auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values);
829 if (!scope.ok()) return;
830 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
831 if (!scope.ok()) return;
832 ::tensorflow::Node* ret;
833 const auto unique_name = scope.GetUniqueNameForOp("SparseReorder");
834 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReorder")
835 .Input(_input_indices)
836 .Input(_input_values)
837 .Input(_input_shape)
838 ;
839 scope.UpdateBuilder(&builder);
840 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
841 if (!scope.ok()) return;
842 scope.UpdateStatus(scope.DoShapeInference(ret));
843 this->operation = Operation(ret);
844 ::tensorflow::NameRangeMap _outputs_range;
845 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
846 if (!_status_.ok()) {
847 scope.UpdateStatus(_status_);
848 return;
849 }
850
851 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
852 this->output_values = Output(ret, _outputs_range["output_values"].first);
853}
854
855SparseReshape::SparseReshape(const ::tensorflow::Scope& scope,
856 ::tensorflow::Input input_indices,
857 ::tensorflow::Input input_shape,
858 ::tensorflow::Input new_shape) {
859 if (!scope.ok()) return;
860 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
861 if (!scope.ok()) return;
862 auto _input_shape = ::tensorflow::ops::AsNodeOut(scope, input_shape);
863 if (!scope.ok()) return;
864 auto _new_shape = ::tensorflow::ops::AsNodeOut(scope, new_shape);
865 if (!scope.ok()) return;
866 ::tensorflow::Node* ret;
867 const auto unique_name = scope.GetUniqueNameForOp("SparseReshape");
868 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseReshape")
869 .Input(_input_indices)
870 .Input(_input_shape)
871 .Input(_new_shape)
872 ;
873 scope.UpdateBuilder(&builder);
874 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
875 if (!scope.ok()) return;
876 scope.UpdateStatus(scope.DoShapeInference(ret));
877 this->operation = Operation(ret);
878 ::tensorflow::NameRangeMap _outputs_range;
879 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
880 if (!_status_.ok()) {
881 scope.UpdateStatus(_status_);
882 return;
883 }
884
885 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
886 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
887}
888
889SparseSlice::SparseSlice(const ::tensorflow::Scope& scope, ::tensorflow::Input
890 indices, ::tensorflow::Input values,
891 ::tensorflow::Input shape, ::tensorflow::Input start,
892 ::tensorflow::Input size) {
893 if (!scope.ok()) return;
894 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
895 if (!scope.ok()) return;
896 auto _values = ::tensorflow::ops::AsNodeOut(scope, values);
897 if (!scope.ok()) return;
898 auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape);
899 if (!scope.ok()) return;
900 auto _start = ::tensorflow::ops::AsNodeOut(scope, start);
901 if (!scope.ok()) return;
902 auto _size = ::tensorflow::ops::AsNodeOut(scope, size);
903 if (!scope.ok()) return;
904 ::tensorflow::Node* ret;
905 const auto unique_name = scope.GetUniqueNameForOp("SparseSlice");
906 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSlice")
907 .Input(_indices)
908 .Input(_values)
909 .Input(_shape)
910 .Input(_start)
911 .Input(_size)
912 ;
913 scope.UpdateBuilder(&builder);
914 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
915 if (!scope.ok()) return;
916 scope.UpdateStatus(scope.DoShapeInference(ret));
917 this->operation = Operation(ret);
918 ::tensorflow::NameRangeMap _outputs_range;
919 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
920 if (!_status_.ok()) {
921 scope.UpdateStatus(_status_);
922 return;
923 }
924
925 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
926 this->output_values = Output(ret, _outputs_range["output_values"].first);
927 this->output_shape = Output(ret, _outputs_range["output_shape"].first);
928}
929
930SparseSliceGrad::SparseSliceGrad(const ::tensorflow::Scope& scope,
931 ::tensorflow::Input backprop_val_grad,
932 ::tensorflow::Input input_indices,
933 ::tensorflow::Input input_start,
934 ::tensorflow::Input output_indices) {
935 if (!scope.ok()) return;
936 auto _backprop_val_grad = ::tensorflow::ops::AsNodeOut(scope, backprop_val_grad);
937 if (!scope.ok()) return;
938 auto _input_indices = ::tensorflow::ops::AsNodeOut(scope, input_indices);
939 if (!scope.ok()) return;
940 auto _input_start = ::tensorflow::ops::AsNodeOut(scope, input_start);
941 if (!scope.ok()) return;
942 auto _output_indices = ::tensorflow::ops::AsNodeOut(scope, output_indices);
943 if (!scope.ok()) return;
944 ::tensorflow::Node* ret;
945 const auto unique_name = scope.GetUniqueNameForOp("SparseSliceGrad");
946 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSliceGrad")
947 .Input(_backprop_val_grad)
948 .Input(_input_indices)
949 .Input(_input_start)
950 .Input(_output_indices)
951 ;
952 scope.UpdateBuilder(&builder);
953 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
954 if (!scope.ok()) return;
955 scope.UpdateStatus(scope.DoShapeInference(ret));
956 this->operation = Operation(ret);
957 this->val_grad = Output(ret, 0);
958}
959
960SparseSoftmax::SparseSoftmax(const ::tensorflow::Scope& scope,
961 ::tensorflow::Input sp_indices,
962 ::tensorflow::Input sp_values, ::tensorflow::Input
963 sp_shape) {
964 if (!scope.ok()) return;
965 auto _sp_indices = ::tensorflow::ops::AsNodeOut(scope, sp_indices);
966 if (!scope.ok()) return;
967 auto _sp_values = ::tensorflow::ops::AsNodeOut(scope, sp_values);
968 if (!scope.ok()) return;
969 auto _sp_shape = ::tensorflow::ops::AsNodeOut(scope, sp_shape);
970 if (!scope.ok()) return;
971 ::tensorflow::Node* ret;
972 const auto unique_name = scope.GetUniqueNameForOp("SparseSoftmax");
973 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSoftmax")
974 .Input(_sp_indices)
975 .Input(_sp_values)
976 .Input(_sp_shape)
977 ;
978 scope.UpdateBuilder(&builder);
979 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
980 if (!scope.ok()) return;
981 scope.UpdateStatus(scope.DoShapeInference(ret));
982 this->operation = Operation(ret);
983 this->output = Output(ret, 0);
984}
985
986SparseSparseMaximum::SparseSparseMaximum(const ::tensorflow::Scope& scope,
987 ::tensorflow::Input a_indices,
988 ::tensorflow::Input a_values,
989 ::tensorflow::Input a_shape,
990 ::tensorflow::Input b_indices,
991 ::tensorflow::Input b_values,
992 ::tensorflow::Input b_shape) {
993 if (!scope.ok()) return;
994 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
995 if (!scope.ok()) return;
996 auto _a_values = ::tensorflow::ops::AsNodeOut(scope, a_values);
997 if (!scope.ok()) return;
998 auto _a_shape = ::tensorflow::ops::AsNodeOut(scope, a_shape);
999 if (!scope.ok()) return;
1000 auto _b_indices = ::tensorflow::ops::AsNodeOut(scope, b_indices);
1001 if (!scope.ok()) return;
1002 auto _b_values = ::tensorflow::ops::AsNodeOut(scope, b_values);
1003 if (!scope.ok()) return;
1004 auto _b_shape = ::tensorflow::ops::AsNodeOut(scope, b_shape);
1005 if (!scope.ok()) return;
1006 ::tensorflow::Node* ret;
1007 const auto unique_name = scope.GetUniqueNameForOp("SparseSparseMaximum");
1008 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSparseMaximum")
1009 .Input(_a_indices)
1010 .Input(_a_values)
1011 .Input(_a_shape)
1012 .Input(_b_indices)
1013 .Input(_b_values)
1014 .Input(_b_shape)
1015 ;
1016 scope.UpdateBuilder(&builder);
1017 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1018 if (!scope.ok()) return;
1019 scope.UpdateStatus(scope.DoShapeInference(ret));
1020 this->operation = Operation(ret);
1021 ::tensorflow::NameRangeMap _outputs_range;
1022 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1023 if (!_status_.ok()) {
1024 scope.UpdateStatus(_status_);
1025 return;
1026 }
1027
1028 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
1029 this->output_values = Output(ret, _outputs_range["output_values"].first);
1030}
1031
1032SparseSparseMinimum::SparseSparseMinimum(const ::tensorflow::Scope& scope,
1033 ::tensorflow::Input a_indices,
1034 ::tensorflow::Input a_values,
1035 ::tensorflow::Input a_shape,
1036 ::tensorflow::Input b_indices,
1037 ::tensorflow::Input b_values,
1038 ::tensorflow::Input b_shape) {
1039 if (!scope.ok()) return;
1040 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
1041 if (!scope.ok()) return;
1042 auto _a_values = ::tensorflow::ops::AsNodeOut(scope, a_values);
1043 if (!scope.ok()) return;
1044 auto _a_shape = ::tensorflow::ops::AsNodeOut(scope, a_shape);
1045 if (!scope.ok()) return;
1046 auto _b_indices = ::tensorflow::ops::AsNodeOut(scope, b_indices);
1047 if (!scope.ok()) return;
1048 auto _b_values = ::tensorflow::ops::AsNodeOut(scope, b_values);
1049 if (!scope.ok()) return;
1050 auto _b_shape = ::tensorflow::ops::AsNodeOut(scope, b_shape);
1051 if (!scope.ok()) return;
1052 ::tensorflow::Node* ret;
1053 const auto unique_name = scope.GetUniqueNameForOp("SparseSparseMinimum");
1054 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSparseMinimum")
1055 .Input(_a_indices)
1056 .Input(_a_values)
1057 .Input(_a_shape)
1058 .Input(_b_indices)
1059 .Input(_b_values)
1060 .Input(_b_shape)
1061 ;
1062 scope.UpdateBuilder(&builder);
1063 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1064 if (!scope.ok()) return;
1065 scope.UpdateStatus(scope.DoShapeInference(ret));
1066 this->operation = Operation(ret);
1067 ::tensorflow::NameRangeMap _outputs_range;
1068 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1069 if (!_status_.ok()) {
1070 scope.UpdateStatus(_status_);
1071 return;
1072 }
1073
1074 this->output_indices = Output(ret, _outputs_range["output_indices"].first);
1075 this->output_values = Output(ret, _outputs_range["output_values"].first);
1076}
1077
1078SparseSplit::SparseSplit(const ::tensorflow::Scope& scope, ::tensorflow::Input
1079 split_dim, ::tensorflow::Input indices,
1080 ::tensorflow::Input values, ::tensorflow::Input shape,
1081 int64 num_split) {
1082 if (!scope.ok()) return;
1083 auto _split_dim = ::tensorflow::ops::AsNodeOut(scope, split_dim);
1084 if (!scope.ok()) return;
1085 auto _indices = ::tensorflow::ops::AsNodeOut(scope, indices);
1086 if (!scope.ok()) return;
1087 auto _values = ::tensorflow::ops::AsNodeOut(scope, values);
1088 if (!scope.ok()) return;
1089 auto _shape = ::tensorflow::ops::AsNodeOut(scope, shape);
1090 if (!scope.ok()) return;
1091 ::tensorflow::Node* ret;
1092 const auto unique_name = scope.GetUniqueNameForOp("SparseSplit");
1093 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseSplit")
1094 .Input(_split_dim)
1095 .Input(_indices)
1096 .Input(_values)
1097 .Input(_shape)
1098 .Attr("num_split", num_split)
1099 ;
1100 scope.UpdateBuilder(&builder);
1101 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1102 if (!scope.ok()) return;
1103 scope.UpdateStatus(scope.DoShapeInference(ret));
1104 this->operation = Operation(ret);
1105 ::tensorflow::NameRangeMap _outputs_range;
1106 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1107 if (!_status_.ok()) {
1108 scope.UpdateStatus(_status_);
1109 return;
1110 }
1111
1112 for (int32 i = _outputs_range["output_indices"].first; i < _outputs_range["output_indices"].second; ++i)
1113 this->output_indices.push_back(Output(ret, i));
1114 for (int32 i = _outputs_range["output_values"].first; i < _outputs_range["output_values"].second; ++i)
1115 this->output_values.push_back(Output(ret, i));
1116 for (int32 i = _outputs_range["output_shape"].first; i < _outputs_range["output_shape"].second; ++i)
1117 this->output_shape.push_back(Output(ret, i));
1118}
1119
1120SparseTensorDenseAdd::SparseTensorDenseAdd(const ::tensorflow::Scope& scope,
1121 ::tensorflow::Input a_indices,
1122 ::tensorflow::Input a_values,
1123 ::tensorflow::Input a_shape,
1124 ::tensorflow::Input b) {
1125 if (!scope.ok()) return;
1126 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
1127 if (!scope.ok()) return;
1128 auto _a_values = ::tensorflow::ops::AsNodeOut(scope, a_values);
1129 if (!scope.ok()) return;
1130 auto _a_shape = ::tensorflow::ops::AsNodeOut(scope, a_shape);
1131 if (!scope.ok()) return;
1132 auto _b = ::tensorflow::ops::AsNodeOut(scope, b);
1133 if (!scope.ok()) return;
1134 ::tensorflow::Node* ret;
1135 const auto unique_name = scope.GetUniqueNameForOp("SparseTensorDenseAdd");
1136 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseTensorDenseAdd")
1137 .Input(_a_indices)
1138 .Input(_a_values)
1139 .Input(_a_shape)
1140 .Input(_b)
1141 ;
1142 scope.UpdateBuilder(&builder);
1143 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1144 if (!scope.ok()) return;
1145 scope.UpdateStatus(scope.DoShapeInference(ret));
1146 this->operation = Operation(ret);
1147 this->output = Output(ret, 0);
1148}
1149
1150SparseTensorDenseMatMul::SparseTensorDenseMatMul(const ::tensorflow::Scope&
1151 scope, ::tensorflow::Input
1152 a_indices, ::tensorflow::Input
1153 a_values, ::tensorflow::Input
1154 a_shape, ::tensorflow::Input
1155 b, const
1156 SparseTensorDenseMatMul::Attrs&
1157 attrs) {
1158 if (!scope.ok()) return;
1159 auto _a_indices = ::tensorflow::ops::AsNodeOut(scope, a_indices);
1160 if (!scope.ok()) return;
1161 auto _a_values = ::tensorflow::ops::AsNodeOut(scope, a_values);
1162 if (!scope.ok()) return;
1163 auto _a_shape = ::tensorflow::ops::AsNodeOut(scope, a_shape);
1164 if (!scope.ok()) return;
1165 auto _b = ::tensorflow::ops::AsNodeOut(scope, b);
1166 if (!scope.ok()) return;
1167 ::tensorflow::Node* ret;
1168 const auto unique_name = scope.GetUniqueNameForOp("SparseTensorDenseMatMul");
1169 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseTensorDenseMatMul")
1170 .Input(_a_indices)
1171 .Input(_a_values)
1172 .Input(_a_shape)
1173 .Input(_b)
1174 .Attr("adjoint_a", attrs.adjoint_a_)
1175 .Attr("adjoint_b", attrs.adjoint_b_)
1176 ;
1177 scope.UpdateBuilder(&builder);
1178 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1179 if (!scope.ok()) return;
1180 scope.UpdateStatus(scope.DoShapeInference(ret));
1181 this->operation = Operation(ret);
1182 this->product = Output(ret, 0);
1183}
1184
1185SparseTensorDenseMatMul::SparseTensorDenseMatMul(const ::tensorflow::Scope&
1186 scope, ::tensorflow::Input
1187 a_indices, ::tensorflow::Input
1188 a_values, ::tensorflow::Input
1189 a_shape, ::tensorflow::Input
1190 b)
1191 : SparseTensorDenseMatMul(scope, a_indices, a_values, a_shape, b, SparseTensorDenseMatMul::Attrs()) {}
1192
1193SparseToDense::SparseToDense(const ::tensorflow::Scope& scope,
1194 ::tensorflow::Input sparse_indices,
1195 ::tensorflow::Input output_shape,
1196 ::tensorflow::Input sparse_values,
1197 ::tensorflow::Input default_value, const
1198 SparseToDense::Attrs& attrs) {
1199 if (!scope.ok()) return;
1200 auto _sparse_indices = ::tensorflow::ops::AsNodeOut(scope, sparse_indices);
1201 if (!scope.ok()) return;
1202 auto _output_shape = ::tensorflow::ops::AsNodeOut(scope, output_shape);
1203 if (!scope.ok()) return;
1204 auto _sparse_values = ::tensorflow::ops::AsNodeOut(scope, sparse_values);
1205 if (!scope.ok()) return;
1206 auto _default_value = ::tensorflow::ops::AsNodeOut(scope, default_value);
1207 if (!scope.ok()) return;
1208 ::tensorflow::Node* ret;
1209 const auto unique_name = scope.GetUniqueNameForOp("SparseToDense");
1210 auto builder = ::tensorflow::NodeBuilder(unique_name, "SparseToDense")
1211 .Input(_sparse_indices)
1212 .Input(_output_shape)
1213 .Input(_sparse_values)
1214 .Input(_default_value)
1215 .Attr("validate_indices", attrs.validate_indices_)
1216 ;
1217 scope.UpdateBuilder(&builder);
1218 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1219 if (!scope.ok()) return;
1220 scope.UpdateStatus(scope.DoShapeInference(ret));
1221 this->operation = Operation(ret);
1222 this->dense = Output(ret, 0);
1223}
1224
1225SparseToDense::SparseToDense(const ::tensorflow::Scope& scope,
1226 ::tensorflow::Input sparse_indices,
1227 ::tensorflow::Input output_shape,
1228 ::tensorflow::Input sparse_values,
1229 ::tensorflow::Input default_value)
1230 : SparseToDense(scope, sparse_indices, output_shape, sparse_values, default_value, SparseToDense::Attrs()) {}
1231
1232TakeManySparseFromTensorsMap::TakeManySparseFromTensorsMap(const
1233 ::tensorflow::Scope&
1234 scope,
1235 ::tensorflow::Input
1236 sparse_handles,
1237 DataType dtype,
1238 const
1239 TakeManySparseFromTensorsMap::Attrs&
1240 attrs) {
1241 if (!scope.ok()) return;
1242 auto _sparse_handles = ::tensorflow::ops::AsNodeOut(scope, sparse_handles);
1243 if (!scope.ok()) return;
1244 ::tensorflow::Node* ret;
1245 const auto unique_name = scope.GetUniqueNameForOp("TakeManySparseFromTensorsMap");
1246 auto builder = ::tensorflow::NodeBuilder(unique_name, "TakeManySparseFromTensorsMap")
1247 .Input(_sparse_handles)
1248 .Attr("dtype", dtype)
1249 .Attr("container", attrs.container_)
1250 .Attr("shared_name", attrs.shared_name_)
1251 ;
1252 scope.UpdateBuilder(&builder);
1253 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
1254 if (!scope.ok()) return;
1255 scope.UpdateStatus(scope.DoShapeInference(ret));
1256 this->operation = Operation(ret);
1257 ::tensorflow::NameRangeMap _outputs_range;
1258 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
1259 if (!_status_.ok()) {
1260 scope.UpdateStatus(_status_);
1261 return;
1262 }
1263
1264 this->sparse_indices = Output(ret, _outputs_range["sparse_indices"].first);
1265 this->sparse_values = Output(ret, _outputs_range["sparse_values"].first);
1266 this->sparse_shape = Output(ret, _outputs_range["sparse_shape"].first);
1267}
1268
1269TakeManySparseFromTensorsMap::TakeManySparseFromTensorsMap(const
1270 ::tensorflow::Scope&
1271 scope,
1272 ::tensorflow::Input
1273 sparse_handles,
1274 DataType dtype)
1275 : TakeManySparseFromTensorsMap(scope, sparse_handles, dtype, TakeManySparseFromTensorsMap::Attrs()) {}
1276
1277/// @}
1278
1279} // namespace ops
1280} // namespace tensorflow
1281