1// This file is MACHINE GENERATED! Do not edit.
2
3
4#include "tensorflow/cc/ops/const_op.h"
5#include "tensorflow/cc/ops/parsing_ops.h"
6
7namespace tensorflow {
8namespace ops {
9
10DecodeCSV::DecodeCSV(const ::tensorflow::Scope& scope, ::tensorflow::Input
11 records, ::tensorflow::InputList record_defaults, const
12 DecodeCSV::Attrs& attrs) {
13 if (!scope.ok()) return;
14 auto _records = ::tensorflow::ops::AsNodeOut(scope, records);
15 if (!scope.ok()) return;
16 auto _record_defaults = ::tensorflow::ops::AsNodeOutList(scope, record_defaults);
17 if (!scope.ok()) return;
18 ::tensorflow::Node* ret;
19 const auto unique_name = scope.GetUniqueNameForOp("DecodeCSV");
20 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeCSV")
21 .Input(_records)
22 .Input(_record_defaults)
23 .Attr("field_delim", attrs.field_delim_)
24 .Attr("use_quote_delim", attrs.use_quote_delim_)
25 .Attr("na_value", attrs.na_value_)
26 .Attr("select_cols", attrs.select_cols_)
27 ;
28 scope.UpdateBuilder(&builder);
29 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
30 if (!scope.ok()) return;
31 scope.UpdateStatus(scope.DoShapeInference(ret));
32 this->operation = Operation(ret);
33 for (int32 i = 0; i < ret->num_outputs(); ++i)
34 this->output.push_back(Output(ret, i));
35}
36
37DecodeCSV::DecodeCSV(const ::tensorflow::Scope& scope, ::tensorflow::Input
38 records, ::tensorflow::InputList record_defaults)
39 : DecodeCSV(scope, records, record_defaults, DecodeCSV::Attrs()) {}
40
41DecodeCompressed::DecodeCompressed(const ::tensorflow::Scope& scope,
42 ::tensorflow::Input bytes, const
43 DecodeCompressed::Attrs& attrs) {
44 if (!scope.ok()) return;
45 auto _bytes = ::tensorflow::ops::AsNodeOut(scope, bytes);
46 if (!scope.ok()) return;
47 ::tensorflow::Node* ret;
48 const auto unique_name = scope.GetUniqueNameForOp("DecodeCompressed");
49 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeCompressed")
50 .Input(_bytes)
51 .Attr("compression_type", attrs.compression_type_)
52 ;
53 scope.UpdateBuilder(&builder);
54 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
55 if (!scope.ok()) return;
56 scope.UpdateStatus(scope.DoShapeInference(ret));
57 this->operation = Operation(ret);
58 this->output = Output(ret, 0);
59}
60
61DecodeCompressed::DecodeCompressed(const ::tensorflow::Scope& scope,
62 ::tensorflow::Input bytes)
63 : DecodeCompressed(scope, bytes, DecodeCompressed::Attrs()) {}
64
65DecodeJSONExample::DecodeJSONExample(const ::tensorflow::Scope& scope,
66 ::tensorflow::Input json_examples) {
67 if (!scope.ok()) return;
68 auto _json_examples = ::tensorflow::ops::AsNodeOut(scope, json_examples);
69 if (!scope.ok()) return;
70 ::tensorflow::Node* ret;
71 const auto unique_name = scope.GetUniqueNameForOp("DecodeJSONExample");
72 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeJSONExample")
73 .Input(_json_examples)
74 ;
75 scope.UpdateBuilder(&builder);
76 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
77 if (!scope.ok()) return;
78 scope.UpdateStatus(scope.DoShapeInference(ret));
79 this->operation = Operation(ret);
80 this->binary_examples = Output(ret, 0);
81}
82
83DecodePaddedRaw::DecodePaddedRaw(const ::tensorflow::Scope& scope,
84 ::tensorflow::Input input_bytes,
85 ::tensorflow::Input fixed_length, DataType
86 out_type, const DecodePaddedRaw::Attrs& attrs) {
87 if (!scope.ok()) return;
88 auto _input_bytes = ::tensorflow::ops::AsNodeOut(scope, input_bytes);
89 if (!scope.ok()) return;
90 auto _fixed_length = ::tensorflow::ops::AsNodeOut(scope, fixed_length);
91 if (!scope.ok()) return;
92 ::tensorflow::Node* ret;
93 const auto unique_name = scope.GetUniqueNameForOp("DecodePaddedRaw");
94 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodePaddedRaw")
95 .Input(_input_bytes)
96 .Input(_fixed_length)
97 .Attr("out_type", out_type)
98 .Attr("little_endian", attrs.little_endian_)
99 ;
100 scope.UpdateBuilder(&builder);
101 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
102 if (!scope.ok()) return;
103 scope.UpdateStatus(scope.DoShapeInference(ret));
104 this->operation = Operation(ret);
105 this->output = Output(ret, 0);
106}
107
108DecodePaddedRaw::DecodePaddedRaw(const ::tensorflow::Scope& scope,
109 ::tensorflow::Input input_bytes,
110 ::tensorflow::Input fixed_length, DataType
111 out_type)
112 : DecodePaddedRaw(scope, input_bytes, fixed_length, out_type, DecodePaddedRaw::Attrs()) {}
113
114DecodeRaw::DecodeRaw(const ::tensorflow::Scope& scope, ::tensorflow::Input
115 bytes, DataType out_type, const DecodeRaw::Attrs& attrs) {
116 if (!scope.ok()) return;
117 auto _bytes = ::tensorflow::ops::AsNodeOut(scope, bytes);
118 if (!scope.ok()) return;
119 ::tensorflow::Node* ret;
120 const auto unique_name = scope.GetUniqueNameForOp("DecodeRaw");
121 auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeRaw")
122 .Input(_bytes)
123 .Attr("out_type", out_type)
124 .Attr("little_endian", attrs.little_endian_)
125 ;
126 scope.UpdateBuilder(&builder);
127 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
128 if (!scope.ok()) return;
129 scope.UpdateStatus(scope.DoShapeInference(ret));
130 this->operation = Operation(ret);
131 this->output = Output(ret, 0);
132}
133
134DecodeRaw::DecodeRaw(const ::tensorflow::Scope& scope, ::tensorflow::Input
135 bytes, DataType out_type)
136 : DecodeRaw(scope, bytes, out_type, DecodeRaw::Attrs()) {}
137
138ParseExample::ParseExample(const ::tensorflow::Scope& scope,
139 ::tensorflow::Input serialized, ::tensorflow::Input
140 names, ::tensorflow::InputList sparse_keys,
141 ::tensorflow::InputList dense_keys,
142 ::tensorflow::InputList dense_defaults, const
143 DataTypeSlice& sparse_types, const
144 gtl::ArraySlice<PartialTensorShape>& dense_shapes) {
145 if (!scope.ok()) return;
146 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
147 if (!scope.ok()) return;
148 auto _names = ::tensorflow::ops::AsNodeOut(scope, names);
149 if (!scope.ok()) return;
150 auto _sparse_keys = ::tensorflow::ops::AsNodeOutList(scope, sparse_keys);
151 if (!scope.ok()) return;
152 auto _dense_keys = ::tensorflow::ops::AsNodeOutList(scope, dense_keys);
153 if (!scope.ok()) return;
154 auto _dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, dense_defaults);
155 if (!scope.ok()) return;
156 ::tensorflow::Node* ret;
157 const auto unique_name = scope.GetUniqueNameForOp("ParseExample");
158 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseExample")
159 .Input(_serialized)
160 .Input(_names)
161 .Input(_sparse_keys)
162 .Input(_dense_keys)
163 .Input(_dense_defaults)
164 .Attr("sparse_types", sparse_types)
165 .Attr("dense_shapes", dense_shapes)
166 ;
167 scope.UpdateBuilder(&builder);
168 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
169 if (!scope.ok()) return;
170 scope.UpdateStatus(scope.DoShapeInference(ret));
171 this->operation = Operation(ret);
172 ::tensorflow::NameRangeMap _outputs_range;
173 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
174 if (!_status_.ok()) {
175 scope.UpdateStatus(_status_);
176 return;
177 }
178
179 for (int32 i = _outputs_range["sparse_indices"].first; i < _outputs_range["sparse_indices"].second; ++i)
180 this->sparse_indices.push_back(Output(ret, i));
181 for (int32 i = _outputs_range["sparse_values"].first; i < _outputs_range["sparse_values"].second; ++i)
182 this->sparse_values.push_back(Output(ret, i));
183 for (int32 i = _outputs_range["sparse_shapes"].first; i < _outputs_range["sparse_shapes"].second; ++i)
184 this->sparse_shapes.push_back(Output(ret, i));
185 for (int32 i = _outputs_range["dense_values"].first; i < _outputs_range["dense_values"].second; ++i)
186 this->dense_values.push_back(Output(ret, i));
187}
188
189ParseExampleV2::ParseExampleV2(const ::tensorflow::Scope& scope,
190 ::tensorflow::Input serialized,
191 ::tensorflow::Input names, ::tensorflow::Input
192 sparse_keys, ::tensorflow::Input dense_keys,
193 ::tensorflow::Input ragged_keys,
194 ::tensorflow::InputList dense_defaults, int64
195 num_sparse, const DataTypeSlice& sparse_types,
196 const DataTypeSlice& ragged_value_types, const
197 DataTypeSlice& ragged_split_types, const
198 gtl::ArraySlice<PartialTensorShape>&
199 dense_shapes) {
200 if (!scope.ok()) return;
201 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
202 if (!scope.ok()) return;
203 auto _names = ::tensorflow::ops::AsNodeOut(scope, names);
204 if (!scope.ok()) return;
205 auto _sparse_keys = ::tensorflow::ops::AsNodeOut(scope, sparse_keys);
206 if (!scope.ok()) return;
207 auto _dense_keys = ::tensorflow::ops::AsNodeOut(scope, dense_keys);
208 if (!scope.ok()) return;
209 auto _ragged_keys = ::tensorflow::ops::AsNodeOut(scope, ragged_keys);
210 if (!scope.ok()) return;
211 auto _dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, dense_defaults);
212 if (!scope.ok()) return;
213 ::tensorflow::Node* ret;
214 const auto unique_name = scope.GetUniqueNameForOp("ParseExampleV2");
215 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseExampleV2")
216 .Input(_serialized)
217 .Input(_names)
218 .Input(_sparse_keys)
219 .Input(_dense_keys)
220 .Input(_ragged_keys)
221 .Input(_dense_defaults)
222 .Attr("num_sparse", num_sparse)
223 .Attr("sparse_types", sparse_types)
224 .Attr("ragged_value_types", ragged_value_types)
225 .Attr("ragged_split_types", ragged_split_types)
226 .Attr("dense_shapes", dense_shapes)
227 ;
228 scope.UpdateBuilder(&builder);
229 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
230 if (!scope.ok()) return;
231 scope.UpdateStatus(scope.DoShapeInference(ret));
232 this->operation = Operation(ret);
233 ::tensorflow::NameRangeMap _outputs_range;
234 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
235 if (!_status_.ok()) {
236 scope.UpdateStatus(_status_);
237 return;
238 }
239
240 for (int32 i = _outputs_range["sparse_indices"].first; i < _outputs_range["sparse_indices"].second; ++i)
241 this->sparse_indices.push_back(Output(ret, i));
242 for (int32 i = _outputs_range["sparse_values"].first; i < _outputs_range["sparse_values"].second; ++i)
243 this->sparse_values.push_back(Output(ret, i));
244 for (int32 i = _outputs_range["sparse_shapes"].first; i < _outputs_range["sparse_shapes"].second; ++i)
245 this->sparse_shapes.push_back(Output(ret, i));
246 for (int32 i = _outputs_range["dense_values"].first; i < _outputs_range["dense_values"].second; ++i)
247 this->dense_values.push_back(Output(ret, i));
248 for (int32 i = _outputs_range["ragged_values"].first; i < _outputs_range["ragged_values"].second; ++i)
249 this->ragged_values.push_back(Output(ret, i));
250 for (int32 i = _outputs_range["ragged_row_splits"].first; i < _outputs_range["ragged_row_splits"].second; ++i)
251 this->ragged_row_splits.push_back(Output(ret, i));
252}
253
254ParseSequenceExample::ParseSequenceExample(const ::tensorflow::Scope& scope,
255 ::tensorflow::Input serialized,
256 ::tensorflow::Input debug_name,
257 ::tensorflow::InputList
258 context_dense_defaults, const
259 gtl::ArraySlice<::tensorflow::tstring>&
260 feature_list_dense_missing_assumed_empty,
261 const
262 gtl::ArraySlice<::tensorflow::tstring>&
263 context_sparse_keys, const
264 gtl::ArraySlice<::tensorflow::tstring>&
265 context_dense_keys, const
266 gtl::ArraySlice<::tensorflow::tstring>&
267 feature_list_sparse_keys, const
268 gtl::ArraySlice<::tensorflow::tstring>&
269 feature_list_dense_keys, const
270 ParseSequenceExample::Attrs& attrs) {
271 if (!scope.ok()) return;
272 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
273 if (!scope.ok()) return;
274 auto _debug_name = ::tensorflow::ops::AsNodeOut(scope, debug_name);
275 if (!scope.ok()) return;
276 auto _context_dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, context_dense_defaults);
277 if (!scope.ok()) return;
278 ::tensorflow::Node* ret;
279 const auto unique_name = scope.GetUniqueNameForOp("ParseSequenceExample");
280 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseSequenceExample")
281 .Input(_serialized)
282 .Input(_debug_name)
283 .Input(_context_dense_defaults)
284 .Attr("feature_list_dense_missing_assumed_empty", feature_list_dense_missing_assumed_empty)
285 .Attr("context_sparse_keys", context_sparse_keys)
286 .Attr("context_dense_keys", context_dense_keys)
287 .Attr("feature_list_sparse_keys", feature_list_sparse_keys)
288 .Attr("feature_list_dense_keys", feature_list_dense_keys)
289 .Attr("Ncontext_sparse", attrs.Ncontext_sparse_)
290 .Attr("Ncontext_dense", attrs.Ncontext_dense_)
291 .Attr("Nfeature_list_sparse", attrs.Nfeature_list_sparse_)
292 .Attr("Nfeature_list_dense", attrs.Nfeature_list_dense_)
293 .Attr("context_sparse_types", attrs.context_sparse_types_)
294 .Attr("feature_list_dense_types", attrs.feature_list_dense_types_)
295 .Attr("context_dense_shapes", attrs.context_dense_shapes_)
296 .Attr("feature_list_sparse_types", attrs.feature_list_sparse_types_)
297 .Attr("feature_list_dense_shapes", attrs.feature_list_dense_shapes_)
298 ;
299 scope.UpdateBuilder(&builder);
300 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
301 if (!scope.ok()) return;
302 scope.UpdateStatus(scope.DoShapeInference(ret));
303 this->operation = Operation(ret);
304 ::tensorflow::NameRangeMap _outputs_range;
305 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
306 if (!_status_.ok()) {
307 scope.UpdateStatus(_status_);
308 return;
309 }
310
311 for (int32 i = _outputs_range["context_sparse_indices"].first; i < _outputs_range["context_sparse_indices"].second; ++i)
312 this->context_sparse_indices.push_back(Output(ret, i));
313 for (int32 i = _outputs_range["context_sparse_values"].first; i < _outputs_range["context_sparse_values"].second; ++i)
314 this->context_sparse_values.push_back(Output(ret, i));
315 for (int32 i = _outputs_range["context_sparse_shapes"].first; i < _outputs_range["context_sparse_shapes"].second; ++i)
316 this->context_sparse_shapes.push_back(Output(ret, i));
317 for (int32 i = _outputs_range["context_dense_values"].first; i < _outputs_range["context_dense_values"].second; ++i)
318 this->context_dense_values.push_back(Output(ret, i));
319 for (int32 i = _outputs_range["feature_list_sparse_indices"].first; i < _outputs_range["feature_list_sparse_indices"].second; ++i)
320 this->feature_list_sparse_indices.push_back(Output(ret, i));
321 for (int32 i = _outputs_range["feature_list_sparse_values"].first; i < _outputs_range["feature_list_sparse_values"].second; ++i)
322 this->feature_list_sparse_values.push_back(Output(ret, i));
323 for (int32 i = _outputs_range["feature_list_sparse_shapes"].first; i < _outputs_range["feature_list_sparse_shapes"].second; ++i)
324 this->feature_list_sparse_shapes.push_back(Output(ret, i));
325 for (int32 i = _outputs_range["feature_list_dense_values"].first; i < _outputs_range["feature_list_dense_values"].second; ++i)
326 this->feature_list_dense_values.push_back(Output(ret, i));
327 for (int32 i = _outputs_range["feature_list_dense_lengths"].first; i < _outputs_range["feature_list_dense_lengths"].second; ++i)
328 this->feature_list_dense_lengths.push_back(Output(ret, i));
329}
330
331ParseSequenceExample::ParseSequenceExample(const ::tensorflow::Scope& scope,
332 ::tensorflow::Input serialized,
333 ::tensorflow::Input debug_name,
334 ::tensorflow::InputList
335 context_dense_defaults, const
336 gtl::ArraySlice<::tensorflow::tstring>&
337 feature_list_dense_missing_assumed_empty,
338 const
339 gtl::ArraySlice<::tensorflow::tstring>&
340 context_sparse_keys, const
341 gtl::ArraySlice<::tensorflow::tstring>&
342 context_dense_keys, const
343 gtl::ArraySlice<::tensorflow::tstring>&
344 feature_list_sparse_keys, const
345 gtl::ArraySlice<::tensorflow::tstring>&
346 feature_list_dense_keys)
347 : ParseSequenceExample(scope, serialized, debug_name, context_dense_defaults, feature_list_dense_missing_assumed_empty, context_sparse_keys, context_dense_keys, feature_list_sparse_keys, feature_list_dense_keys, ParseSequenceExample::Attrs()) {}
348
349ParseSequenceExampleV2::ParseSequenceExampleV2(const ::tensorflow::Scope&
350 scope, ::tensorflow::Input
351 serialized, ::tensorflow::Input
352 debug_name, ::tensorflow::Input
353 context_sparse_keys,
354 ::tensorflow::Input
355 context_dense_keys,
356 ::tensorflow::Input
357 context_ragged_keys,
358 ::tensorflow::Input
359 feature_list_sparse_keys,
360 ::tensorflow::Input
361 feature_list_dense_keys,
362 ::tensorflow::Input
363 feature_list_ragged_keys,
364 ::tensorflow::Input
365 feature_list_dense_missing_assumed_empty,
366 ::tensorflow::InputList
367 context_dense_defaults, const
368 ParseSequenceExampleV2::Attrs&
369 attrs) {
370 if (!scope.ok()) return;
371 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
372 if (!scope.ok()) return;
373 auto _debug_name = ::tensorflow::ops::AsNodeOut(scope, debug_name);
374 if (!scope.ok()) return;
375 auto _context_sparse_keys = ::tensorflow::ops::AsNodeOut(scope, context_sparse_keys);
376 if (!scope.ok()) return;
377 auto _context_dense_keys = ::tensorflow::ops::AsNodeOut(scope, context_dense_keys);
378 if (!scope.ok()) return;
379 auto _context_ragged_keys = ::tensorflow::ops::AsNodeOut(scope, context_ragged_keys);
380 if (!scope.ok()) return;
381 auto _feature_list_sparse_keys = ::tensorflow::ops::AsNodeOut(scope, feature_list_sparse_keys);
382 if (!scope.ok()) return;
383 auto _feature_list_dense_keys = ::tensorflow::ops::AsNodeOut(scope, feature_list_dense_keys);
384 if (!scope.ok()) return;
385 auto _feature_list_ragged_keys = ::tensorflow::ops::AsNodeOut(scope, feature_list_ragged_keys);
386 if (!scope.ok()) return;
387 auto _feature_list_dense_missing_assumed_empty = ::tensorflow::ops::AsNodeOut(scope, feature_list_dense_missing_assumed_empty);
388 if (!scope.ok()) return;
389 auto _context_dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, context_dense_defaults);
390 if (!scope.ok()) return;
391 ::tensorflow::Node* ret;
392 const auto unique_name = scope.GetUniqueNameForOp("ParseSequenceExampleV2");
393 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseSequenceExampleV2")
394 .Input(_serialized)
395 .Input(_debug_name)
396 .Input(_context_sparse_keys)
397 .Input(_context_dense_keys)
398 .Input(_context_ragged_keys)
399 .Input(_feature_list_sparse_keys)
400 .Input(_feature_list_dense_keys)
401 .Input(_feature_list_ragged_keys)
402 .Input(_feature_list_dense_missing_assumed_empty)
403 .Input(_context_dense_defaults)
404 .Attr("Ncontext_sparse", attrs.Ncontext_sparse_)
405 .Attr("context_sparse_types", attrs.context_sparse_types_)
406 .Attr("context_ragged_value_types", attrs.context_ragged_value_types_)
407 .Attr("context_ragged_split_types", attrs.context_ragged_split_types_)
408 .Attr("context_dense_shapes", attrs.context_dense_shapes_)
409 .Attr("Nfeature_list_sparse", attrs.Nfeature_list_sparse_)
410 .Attr("Nfeature_list_dense", attrs.Nfeature_list_dense_)
411 .Attr("feature_list_dense_types", attrs.feature_list_dense_types_)
412 .Attr("feature_list_sparse_types", attrs.feature_list_sparse_types_)
413 .Attr("feature_list_ragged_value_types", attrs.feature_list_ragged_value_types_)
414 .Attr("feature_list_ragged_split_types", attrs.feature_list_ragged_split_types_)
415 .Attr("feature_list_dense_shapes", attrs.feature_list_dense_shapes_)
416 ;
417 scope.UpdateBuilder(&builder);
418 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
419 if (!scope.ok()) return;
420 scope.UpdateStatus(scope.DoShapeInference(ret));
421 this->operation = Operation(ret);
422 ::tensorflow::NameRangeMap _outputs_range;
423 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
424 if (!_status_.ok()) {
425 scope.UpdateStatus(_status_);
426 return;
427 }
428
429 for (int32 i = _outputs_range["context_sparse_indices"].first; i < _outputs_range["context_sparse_indices"].second; ++i)
430 this->context_sparse_indices.push_back(Output(ret, i));
431 for (int32 i = _outputs_range["context_sparse_values"].first; i < _outputs_range["context_sparse_values"].second; ++i)
432 this->context_sparse_values.push_back(Output(ret, i));
433 for (int32 i = _outputs_range["context_sparse_shapes"].first; i < _outputs_range["context_sparse_shapes"].second; ++i)
434 this->context_sparse_shapes.push_back(Output(ret, i));
435 for (int32 i = _outputs_range["context_dense_values"].first; i < _outputs_range["context_dense_values"].second; ++i)
436 this->context_dense_values.push_back(Output(ret, i));
437 for (int32 i = _outputs_range["context_ragged_values"].first; i < _outputs_range["context_ragged_values"].second; ++i)
438 this->context_ragged_values.push_back(Output(ret, i));
439 for (int32 i = _outputs_range["context_ragged_row_splits"].first; i < _outputs_range["context_ragged_row_splits"].second; ++i)
440 this->context_ragged_row_splits.push_back(Output(ret, i));
441 for (int32 i = _outputs_range["feature_list_sparse_indices"].first; i < _outputs_range["feature_list_sparse_indices"].second; ++i)
442 this->feature_list_sparse_indices.push_back(Output(ret, i));
443 for (int32 i = _outputs_range["feature_list_sparse_values"].first; i < _outputs_range["feature_list_sparse_values"].second; ++i)
444 this->feature_list_sparse_values.push_back(Output(ret, i));
445 for (int32 i = _outputs_range["feature_list_sparse_shapes"].first; i < _outputs_range["feature_list_sparse_shapes"].second; ++i)
446 this->feature_list_sparse_shapes.push_back(Output(ret, i));
447 for (int32 i = _outputs_range["feature_list_dense_values"].first; i < _outputs_range["feature_list_dense_values"].second; ++i)
448 this->feature_list_dense_values.push_back(Output(ret, i));
449 for (int32 i = _outputs_range["feature_list_dense_lengths"].first; i < _outputs_range["feature_list_dense_lengths"].second; ++i)
450 this->feature_list_dense_lengths.push_back(Output(ret, i));
451 for (int32 i = _outputs_range["feature_list_ragged_values"].first; i < _outputs_range["feature_list_ragged_values"].second; ++i)
452 this->feature_list_ragged_values.push_back(Output(ret, i));
453 for (int32 i = _outputs_range["feature_list_ragged_outer_splits"].first; i < _outputs_range["feature_list_ragged_outer_splits"].second; ++i)
454 this->feature_list_ragged_outer_splits.push_back(Output(ret, i));
455 for (int32 i = _outputs_range["feature_list_ragged_inner_splits"].first; i < _outputs_range["feature_list_ragged_inner_splits"].second; ++i)
456 this->feature_list_ragged_inner_splits.push_back(Output(ret, i));
457}
458
459ParseSequenceExampleV2::ParseSequenceExampleV2(const ::tensorflow::Scope&
460 scope, ::tensorflow::Input
461 serialized, ::tensorflow::Input
462 debug_name, ::tensorflow::Input
463 context_sparse_keys,
464 ::tensorflow::Input
465 context_dense_keys,
466 ::tensorflow::Input
467 context_ragged_keys,
468 ::tensorflow::Input
469 feature_list_sparse_keys,
470 ::tensorflow::Input
471 feature_list_dense_keys,
472 ::tensorflow::Input
473 feature_list_ragged_keys,
474 ::tensorflow::Input
475 feature_list_dense_missing_assumed_empty,
476 ::tensorflow::InputList
477 context_dense_defaults)
478 : ParseSequenceExampleV2(scope, serialized, debug_name, context_sparse_keys, context_dense_keys, context_ragged_keys, feature_list_sparse_keys, feature_list_dense_keys, feature_list_ragged_keys, feature_list_dense_missing_assumed_empty, context_dense_defaults, ParseSequenceExampleV2::Attrs()) {}
479
480ParseSingleExample::ParseSingleExample(const ::tensorflow::Scope& scope,
481 ::tensorflow::Input serialized,
482 ::tensorflow::InputList dense_defaults,
483 int64 num_sparse, const
484 gtl::ArraySlice<::tensorflow::tstring>&
485 sparse_keys, const
486 gtl::ArraySlice<::tensorflow::tstring>&
487 dense_keys, const DataTypeSlice&
488 sparse_types, const
489 gtl::ArraySlice<PartialTensorShape>&
490 dense_shapes) {
491 if (!scope.ok()) return;
492 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
493 if (!scope.ok()) return;
494 auto _dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, dense_defaults);
495 if (!scope.ok()) return;
496 ::tensorflow::Node* ret;
497 const auto unique_name = scope.GetUniqueNameForOp("ParseSingleExample");
498 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseSingleExample")
499 .Input(_serialized)
500 .Input(_dense_defaults)
501 .Attr("num_sparse", num_sparse)
502 .Attr("sparse_keys", sparse_keys)
503 .Attr("dense_keys", dense_keys)
504 .Attr("sparse_types", sparse_types)
505 .Attr("dense_shapes", dense_shapes)
506 ;
507 scope.UpdateBuilder(&builder);
508 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
509 if (!scope.ok()) return;
510 scope.UpdateStatus(scope.DoShapeInference(ret));
511 this->operation = Operation(ret);
512 ::tensorflow::NameRangeMap _outputs_range;
513 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
514 if (!_status_.ok()) {
515 scope.UpdateStatus(_status_);
516 return;
517 }
518
519 for (int32 i = _outputs_range["sparse_indices"].first; i < _outputs_range["sparse_indices"].second; ++i)
520 this->sparse_indices.push_back(Output(ret, i));
521 for (int32 i = _outputs_range["sparse_values"].first; i < _outputs_range["sparse_values"].second; ++i)
522 this->sparse_values.push_back(Output(ret, i));
523 for (int32 i = _outputs_range["sparse_shapes"].first; i < _outputs_range["sparse_shapes"].second; ++i)
524 this->sparse_shapes.push_back(Output(ret, i));
525 for (int32 i = _outputs_range["dense_values"].first; i < _outputs_range["dense_values"].second; ++i)
526 this->dense_values.push_back(Output(ret, i));
527}
528
529ParseSingleSequenceExample::ParseSingleSequenceExample(const
530 ::tensorflow::Scope&
531 scope,
532 ::tensorflow::Input
533 serialized,
534 ::tensorflow::Input
535 feature_list_dense_missing_assumed_empty,
536 ::tensorflow::InputList
537 context_sparse_keys,
538 ::tensorflow::InputList
539 context_dense_keys,
540 ::tensorflow::InputList
541 feature_list_sparse_keys,
542 ::tensorflow::InputList
543 feature_list_dense_keys,
544 ::tensorflow::InputList
545 context_dense_defaults,
546 ::tensorflow::Input
547 debug_name, const
548 ParseSingleSequenceExample::Attrs&
549 attrs) {
550 if (!scope.ok()) return;
551 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
552 if (!scope.ok()) return;
553 auto _feature_list_dense_missing_assumed_empty = ::tensorflow::ops::AsNodeOut(scope, feature_list_dense_missing_assumed_empty);
554 if (!scope.ok()) return;
555 auto _context_sparse_keys = ::tensorflow::ops::AsNodeOutList(scope, context_sparse_keys);
556 if (!scope.ok()) return;
557 auto _context_dense_keys = ::tensorflow::ops::AsNodeOutList(scope, context_dense_keys);
558 if (!scope.ok()) return;
559 auto _feature_list_sparse_keys = ::tensorflow::ops::AsNodeOutList(scope, feature_list_sparse_keys);
560 if (!scope.ok()) return;
561 auto _feature_list_dense_keys = ::tensorflow::ops::AsNodeOutList(scope, feature_list_dense_keys);
562 if (!scope.ok()) return;
563 auto _context_dense_defaults = ::tensorflow::ops::AsNodeOutList(scope, context_dense_defaults);
564 if (!scope.ok()) return;
565 auto _debug_name = ::tensorflow::ops::AsNodeOut(scope, debug_name);
566 if (!scope.ok()) return;
567 ::tensorflow::Node* ret;
568 const auto unique_name = scope.GetUniqueNameForOp("ParseSingleSequenceExample");
569 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseSingleSequenceExample")
570 .Input(_serialized)
571 .Input(_feature_list_dense_missing_assumed_empty)
572 .Input(_context_sparse_keys)
573 .Input(_context_dense_keys)
574 .Input(_feature_list_sparse_keys)
575 .Input(_feature_list_dense_keys)
576 .Input(_context_dense_defaults)
577 .Input(_debug_name)
578 .Attr("context_sparse_types", attrs.context_sparse_types_)
579 .Attr("feature_list_dense_types", attrs.feature_list_dense_types_)
580 .Attr("context_dense_shapes", attrs.context_dense_shapes_)
581 .Attr("feature_list_sparse_types", attrs.feature_list_sparse_types_)
582 .Attr("feature_list_dense_shapes", attrs.feature_list_dense_shapes_)
583 ;
584 scope.UpdateBuilder(&builder);
585 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
586 if (!scope.ok()) return;
587 scope.UpdateStatus(scope.DoShapeInference(ret));
588 this->operation = Operation(ret);
589 ::tensorflow::NameRangeMap _outputs_range;
590 ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range);
591 if (!_status_.ok()) {
592 scope.UpdateStatus(_status_);
593 return;
594 }
595
596 for (int32 i = _outputs_range["context_sparse_indices"].first; i < _outputs_range["context_sparse_indices"].second; ++i)
597 this->context_sparse_indices.push_back(Output(ret, i));
598 for (int32 i = _outputs_range["context_sparse_values"].first; i < _outputs_range["context_sparse_values"].second; ++i)
599 this->context_sparse_values.push_back(Output(ret, i));
600 for (int32 i = _outputs_range["context_sparse_shapes"].first; i < _outputs_range["context_sparse_shapes"].second; ++i)
601 this->context_sparse_shapes.push_back(Output(ret, i));
602 for (int32 i = _outputs_range["context_dense_values"].first; i < _outputs_range["context_dense_values"].second; ++i)
603 this->context_dense_values.push_back(Output(ret, i));
604 for (int32 i = _outputs_range["feature_list_sparse_indices"].first; i < _outputs_range["feature_list_sparse_indices"].second; ++i)
605 this->feature_list_sparse_indices.push_back(Output(ret, i));
606 for (int32 i = _outputs_range["feature_list_sparse_values"].first; i < _outputs_range["feature_list_sparse_values"].second; ++i)
607 this->feature_list_sparse_values.push_back(Output(ret, i));
608 for (int32 i = _outputs_range["feature_list_sparse_shapes"].first; i < _outputs_range["feature_list_sparse_shapes"].second; ++i)
609 this->feature_list_sparse_shapes.push_back(Output(ret, i));
610 for (int32 i = _outputs_range["feature_list_dense_values"].first; i < _outputs_range["feature_list_dense_values"].second; ++i)
611 this->feature_list_dense_values.push_back(Output(ret, i));
612}
613
614ParseSingleSequenceExample::ParseSingleSequenceExample(const
615 ::tensorflow::Scope&
616 scope,
617 ::tensorflow::Input
618 serialized,
619 ::tensorflow::Input
620 feature_list_dense_missing_assumed_empty,
621 ::tensorflow::InputList
622 context_sparse_keys,
623 ::tensorflow::InputList
624 context_dense_keys,
625 ::tensorflow::InputList
626 feature_list_sparse_keys,
627 ::tensorflow::InputList
628 feature_list_dense_keys,
629 ::tensorflow::InputList
630 context_dense_defaults,
631 ::tensorflow::Input
632 debug_name)
633 : ParseSingleSequenceExample(scope, serialized, feature_list_dense_missing_assumed_empty, context_sparse_keys, context_dense_keys, feature_list_sparse_keys, feature_list_dense_keys, context_dense_defaults, debug_name, ParseSingleSequenceExample::Attrs()) {}
634
635ParseTensor::ParseTensor(const ::tensorflow::Scope& scope, ::tensorflow::Input
636 serialized, DataType out_type) {
637 if (!scope.ok()) return;
638 auto _serialized = ::tensorflow::ops::AsNodeOut(scope, serialized);
639 if (!scope.ok()) return;
640 ::tensorflow::Node* ret;
641 const auto unique_name = scope.GetUniqueNameForOp("ParseTensor");
642 auto builder = ::tensorflow::NodeBuilder(unique_name, "ParseTensor")
643 .Input(_serialized)
644 .Attr("out_type", out_type)
645 ;
646 scope.UpdateBuilder(&builder);
647 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
648 if (!scope.ok()) return;
649 scope.UpdateStatus(scope.DoShapeInference(ret));
650 this->operation = Operation(ret);
651 this->output = Output(ret, 0);
652}
653
654SerializeTensor::SerializeTensor(const ::tensorflow::Scope& scope,
655 ::tensorflow::Input tensor) {
656 if (!scope.ok()) return;
657 auto _tensor = ::tensorflow::ops::AsNodeOut(scope, tensor);
658 if (!scope.ok()) return;
659 ::tensorflow::Node* ret;
660 const auto unique_name = scope.GetUniqueNameForOp("SerializeTensor");
661 auto builder = ::tensorflow::NodeBuilder(unique_name, "SerializeTensor")
662 .Input(_tensor)
663 ;
664 scope.UpdateBuilder(&builder);
665 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
666 if (!scope.ok()) return;
667 scope.UpdateStatus(scope.DoShapeInference(ret));
668 this->operation = Operation(ret);
669 this->serialized = Output(ret, 0);
670}
671
672StringToNumber::StringToNumber(const ::tensorflow::Scope& scope,
673 ::tensorflow::Input string_tensor, const
674 StringToNumber::Attrs& attrs) {
675 if (!scope.ok()) return;
676 auto _string_tensor = ::tensorflow::ops::AsNodeOut(scope, string_tensor);
677 if (!scope.ok()) return;
678 ::tensorflow::Node* ret;
679 const auto unique_name = scope.GetUniqueNameForOp("StringToNumber");
680 auto builder = ::tensorflow::NodeBuilder(unique_name, "StringToNumber")
681 .Input(_string_tensor)
682 .Attr("out_type", attrs.out_type_)
683 ;
684 scope.UpdateBuilder(&builder);
685 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
686 if (!scope.ok()) return;
687 scope.UpdateStatus(scope.DoShapeInference(ret));
688 this->operation = Operation(ret);
689 this->output = Output(ret, 0);
690}
691
692StringToNumber::StringToNumber(const ::tensorflow::Scope& scope,
693 ::tensorflow::Input string_tensor)
694 : StringToNumber(scope, string_tensor, StringToNumber::Attrs()) {}
695
696/// @}
697
698} // namespace ops
699} // namespace tensorflow
700