1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/string_ops.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | |
10 | AsString::AsString(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
11 | const AsString::Attrs& attrs) { |
12 | if (!scope.ok()) return; |
13 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
14 | if (!scope.ok()) return; |
15 | ::tensorflow::Node* ret; |
16 | const auto unique_name = scope.GetUniqueNameForOp("AsString" ); |
17 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AsString" ) |
18 | .Input(_input) |
19 | .Attr("precision" , attrs.precision_) |
20 | .Attr("scientific" , attrs.scientific_) |
21 | .Attr("shortest" , attrs.shortest_) |
22 | .Attr("width" , attrs.width_) |
23 | .Attr("fill" , attrs.fill_) |
24 | ; |
25 | scope.UpdateBuilder(&builder); |
26 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
27 | if (!scope.ok()) return; |
28 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
29 | this->operation = Operation(ret); |
30 | this->output = Output(ret, 0); |
31 | } |
32 | |
33 | AsString::AsString(const ::tensorflow::Scope& scope, ::tensorflow::Input input) |
34 | : AsString(scope, input, AsString::Attrs()) {} |
35 | |
36 | DecodeBase64::DecodeBase64(const ::tensorflow::Scope& scope, |
37 | ::tensorflow::Input input) { |
38 | if (!scope.ok()) return; |
39 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
40 | if (!scope.ok()) return; |
41 | ::tensorflow::Node* ret; |
42 | const auto unique_name = scope.GetUniqueNameForOp("DecodeBase64" ); |
43 | auto builder = ::tensorflow::NodeBuilder(unique_name, "DecodeBase64" ) |
44 | .Input(_input) |
45 | ; |
46 | scope.UpdateBuilder(&builder); |
47 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
48 | if (!scope.ok()) return; |
49 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
50 | this->operation = Operation(ret); |
51 | this->output = Output(ret, 0); |
52 | } |
53 | |
54 | EncodeBase64::EncodeBase64(const ::tensorflow::Scope& scope, |
55 | ::tensorflow::Input input, const |
56 | EncodeBase64::Attrs& attrs) { |
57 | if (!scope.ok()) return; |
58 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
59 | if (!scope.ok()) return; |
60 | ::tensorflow::Node* ret; |
61 | const auto unique_name = scope.GetUniqueNameForOp("EncodeBase64" ); |
62 | auto builder = ::tensorflow::NodeBuilder(unique_name, "EncodeBase64" ) |
63 | .Input(_input) |
64 | .Attr("pad" , attrs.pad_) |
65 | ; |
66 | scope.UpdateBuilder(&builder); |
67 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
68 | if (!scope.ok()) return; |
69 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
70 | this->operation = Operation(ret); |
71 | this->output = Output(ret, 0); |
72 | } |
73 | |
74 | EncodeBase64::EncodeBase64(const ::tensorflow::Scope& scope, |
75 | ::tensorflow::Input input) |
76 | : EncodeBase64(scope, input, EncodeBase64::Attrs()) {} |
77 | |
78 | ReduceJoin::ReduceJoin(const ::tensorflow::Scope& scope, ::tensorflow::Input |
79 | inputs, ::tensorflow::Input reduction_indices, const |
80 | ReduceJoin::Attrs& attrs) { |
81 | if (!scope.ok()) return; |
82 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
83 | if (!scope.ok()) return; |
84 | auto _reduction_indices = ::tensorflow::ops::AsNodeOut(scope, reduction_indices); |
85 | if (!scope.ok()) return; |
86 | ::tensorflow::Node* ret; |
87 | const auto unique_name = scope.GetUniqueNameForOp("ReduceJoin" ); |
88 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ReduceJoin" ) |
89 | .Input(_inputs) |
90 | .Input(_reduction_indices) |
91 | .Attr("keep_dims" , attrs.keep_dims_) |
92 | .Attr("separator" , attrs.separator_) |
93 | ; |
94 | scope.UpdateBuilder(&builder); |
95 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
96 | if (!scope.ok()) return; |
97 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
98 | this->operation = Operation(ret); |
99 | this->output = Output(ret, 0); |
100 | } |
101 | |
102 | ReduceJoin::ReduceJoin(const ::tensorflow::Scope& scope, ::tensorflow::Input |
103 | inputs, ::tensorflow::Input reduction_indices) |
104 | : ReduceJoin(scope, inputs, reduction_indices, ReduceJoin::Attrs()) {} |
105 | |
106 | RegexFullMatch::RegexFullMatch(const ::tensorflow::Scope& scope, |
107 | ::tensorflow::Input input, ::tensorflow::Input |
108 | pattern) { |
109 | if (!scope.ok()) return; |
110 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
111 | if (!scope.ok()) return; |
112 | auto _pattern = ::tensorflow::ops::AsNodeOut(scope, pattern); |
113 | if (!scope.ok()) return; |
114 | ::tensorflow::Node* ret; |
115 | const auto unique_name = scope.GetUniqueNameForOp("RegexFullMatch" ); |
116 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RegexFullMatch" ) |
117 | .Input(_input) |
118 | .Input(_pattern) |
119 | ; |
120 | scope.UpdateBuilder(&builder); |
121 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
122 | if (!scope.ok()) return; |
123 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
124 | this->operation = Operation(ret); |
125 | this->output = Output(ret, 0); |
126 | } |
127 | |
128 | RegexReplace::RegexReplace(const ::tensorflow::Scope& scope, |
129 | ::tensorflow::Input input, ::tensorflow::Input |
130 | pattern, ::tensorflow::Input rewrite, const |
131 | RegexReplace::Attrs& attrs) { |
132 | if (!scope.ok()) return; |
133 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
134 | if (!scope.ok()) return; |
135 | auto _pattern = ::tensorflow::ops::AsNodeOut(scope, pattern); |
136 | if (!scope.ok()) return; |
137 | auto _rewrite = ::tensorflow::ops::AsNodeOut(scope, rewrite); |
138 | if (!scope.ok()) return; |
139 | ::tensorflow::Node* ret; |
140 | const auto unique_name = scope.GetUniqueNameForOp("RegexReplace" ); |
141 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RegexReplace" ) |
142 | .Input(_input) |
143 | .Input(_pattern) |
144 | .Input(_rewrite) |
145 | .Attr("replace_global" , attrs.replace_global_) |
146 | ; |
147 | scope.UpdateBuilder(&builder); |
148 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
149 | if (!scope.ok()) return; |
150 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
151 | this->operation = Operation(ret); |
152 | this->output = Output(ret, 0); |
153 | } |
154 | |
155 | RegexReplace::RegexReplace(const ::tensorflow::Scope& scope, |
156 | ::tensorflow::Input input, ::tensorflow::Input |
157 | pattern, ::tensorflow::Input rewrite) |
158 | : RegexReplace(scope, input, pattern, rewrite, RegexReplace::Attrs()) {} |
159 | |
160 | StringFormat::StringFormat(const ::tensorflow::Scope& scope, |
161 | ::tensorflow::InputList inputs, const |
162 | StringFormat::Attrs& attrs) { |
163 | if (!scope.ok()) return; |
164 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
165 | if (!scope.ok()) return; |
166 | ::tensorflow::Node* ret; |
167 | const auto unique_name = scope.GetUniqueNameForOp("StringFormat" ); |
168 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringFormat" ) |
169 | .Input(_inputs) |
170 | .Attr("template" , attrs.template_) |
171 | .Attr("placeholder" , attrs.placeholder_) |
172 | .Attr("summarize" , attrs.summarize_) |
173 | ; |
174 | scope.UpdateBuilder(&builder); |
175 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
176 | if (!scope.ok()) return; |
177 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
178 | this->operation = Operation(ret); |
179 | this->output = Output(ret, 0); |
180 | } |
181 | |
182 | StringFormat::StringFormat(const ::tensorflow::Scope& scope, |
183 | ::tensorflow::InputList inputs) |
184 | : StringFormat(scope, inputs, StringFormat::Attrs()) {} |
185 | |
186 | StringJoin::StringJoin(const ::tensorflow::Scope& scope, |
187 | ::tensorflow::InputList inputs, const StringJoin::Attrs& |
188 | attrs) { |
189 | if (!scope.ok()) return; |
190 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
191 | if (!scope.ok()) return; |
192 | ::tensorflow::Node* ret; |
193 | const auto unique_name = scope.GetUniqueNameForOp("StringJoin" ); |
194 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringJoin" ) |
195 | .Input(_inputs) |
196 | .Attr("separator" , attrs.separator_) |
197 | ; |
198 | scope.UpdateBuilder(&builder); |
199 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
200 | if (!scope.ok()) return; |
201 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
202 | this->operation = Operation(ret); |
203 | this->output = Output(ret, 0); |
204 | } |
205 | |
206 | StringJoin::StringJoin(const ::tensorflow::Scope& scope, |
207 | ::tensorflow::InputList inputs) |
208 | : StringJoin(scope, inputs, StringJoin::Attrs()) {} |
209 | |
210 | StringLength::StringLength(const ::tensorflow::Scope& scope, |
211 | ::tensorflow::Input input, const |
212 | StringLength::Attrs& attrs) { |
213 | if (!scope.ok()) return; |
214 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
215 | if (!scope.ok()) return; |
216 | ::tensorflow::Node* ret; |
217 | const auto unique_name = scope.GetUniqueNameForOp("StringLength" ); |
218 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringLength" ) |
219 | .Input(_input) |
220 | .Attr("unit" , attrs.unit_) |
221 | ; |
222 | scope.UpdateBuilder(&builder); |
223 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
224 | if (!scope.ok()) return; |
225 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
226 | this->operation = Operation(ret); |
227 | this->output = Output(ret, 0); |
228 | } |
229 | |
230 | StringLength::StringLength(const ::tensorflow::Scope& scope, |
231 | ::tensorflow::Input input) |
232 | : StringLength(scope, input, StringLength::Attrs()) {} |
233 | |
234 | StringLower::StringLower(const ::tensorflow::Scope& scope, ::tensorflow::Input |
235 | input, const StringLower::Attrs& attrs) { |
236 | if (!scope.ok()) return; |
237 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
238 | if (!scope.ok()) return; |
239 | ::tensorflow::Node* ret; |
240 | const auto unique_name = scope.GetUniqueNameForOp("StringLower" ); |
241 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringLower" ) |
242 | .Input(_input) |
243 | .Attr("encoding" , attrs.encoding_) |
244 | ; |
245 | scope.UpdateBuilder(&builder); |
246 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
247 | if (!scope.ok()) return; |
248 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
249 | this->operation = Operation(ret); |
250 | this->output = Output(ret, 0); |
251 | } |
252 | |
253 | StringLower::StringLower(const ::tensorflow::Scope& scope, ::tensorflow::Input |
254 | input) |
255 | : StringLower(scope, input, StringLower::Attrs()) {} |
256 | |
257 | StringNGrams::StringNGrams(const ::tensorflow::Scope& scope, |
258 | ::tensorflow::Input data, ::tensorflow::Input |
259 | data_splits, StringPiece separator, const |
260 | gtl::ArraySlice<int>& ngram_widths, StringPiece |
261 | left_pad, StringPiece right_pad, int64 pad_width, |
262 | bool preserve_short_sequences) { |
263 | if (!scope.ok()) return; |
264 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
265 | if (!scope.ok()) return; |
266 | auto _data_splits = ::tensorflow::ops::AsNodeOut(scope, data_splits); |
267 | if (!scope.ok()) return; |
268 | ::tensorflow::Node* ret; |
269 | const auto unique_name = scope.GetUniqueNameForOp("StringNGrams" ); |
270 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringNGrams" ) |
271 | .Input(_data) |
272 | .Input(_data_splits) |
273 | .Attr("separator" , separator) |
274 | .Attr("ngram_widths" , ngram_widths) |
275 | .Attr("left_pad" , left_pad) |
276 | .Attr("right_pad" , right_pad) |
277 | .Attr("pad_width" , pad_width) |
278 | .Attr("preserve_short_sequences" , preserve_short_sequences) |
279 | ; |
280 | scope.UpdateBuilder(&builder); |
281 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
282 | if (!scope.ok()) return; |
283 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
284 | this->operation = Operation(ret); |
285 | ::tensorflow::NameRangeMap _outputs_range; |
286 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
287 | if (!_status_.ok()) { |
288 | scope.UpdateStatus(_status_); |
289 | return; |
290 | } |
291 | |
292 | this->ngrams = Output(ret, _outputs_range["ngrams" ].first); |
293 | this->ngrams_splits = Output(ret, _outputs_range["ngrams_splits" ].first); |
294 | } |
295 | |
296 | StringSplit::StringSplit(const ::tensorflow::Scope& scope, ::tensorflow::Input |
297 | input, ::tensorflow::Input delimiter, const |
298 | StringSplit::Attrs& attrs) { |
299 | if (!scope.ok()) return; |
300 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
301 | if (!scope.ok()) return; |
302 | auto _delimiter = ::tensorflow::ops::AsNodeOut(scope, delimiter); |
303 | if (!scope.ok()) return; |
304 | ::tensorflow::Node* ret; |
305 | const auto unique_name = scope.GetUniqueNameForOp("StringSplit" ); |
306 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringSplit" ) |
307 | .Input(_input) |
308 | .Input(_delimiter) |
309 | .Attr("skip_empty" , attrs.skip_empty_) |
310 | ; |
311 | scope.UpdateBuilder(&builder); |
312 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
313 | if (!scope.ok()) return; |
314 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
315 | this->operation = Operation(ret); |
316 | ::tensorflow::NameRangeMap _outputs_range; |
317 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
318 | if (!_status_.ok()) { |
319 | scope.UpdateStatus(_status_); |
320 | return; |
321 | } |
322 | |
323 | this->indices = Output(ret, _outputs_range["indices" ].first); |
324 | this->values = Output(ret, _outputs_range["values" ].first); |
325 | this->shape = Output(ret, _outputs_range["shape" ].first); |
326 | } |
327 | |
328 | StringSplit::StringSplit(const ::tensorflow::Scope& scope, ::tensorflow::Input |
329 | input, ::tensorflow::Input delimiter) |
330 | : StringSplit(scope, input, delimiter, StringSplit::Attrs()) {} |
331 | |
332 | StringSplitV2::StringSplitV2(const ::tensorflow::Scope& scope, |
333 | ::tensorflow::Input input, ::tensorflow::Input |
334 | sep, const StringSplitV2::Attrs& attrs) { |
335 | if (!scope.ok()) return; |
336 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
337 | if (!scope.ok()) return; |
338 | auto _sep = ::tensorflow::ops::AsNodeOut(scope, sep); |
339 | if (!scope.ok()) return; |
340 | ::tensorflow::Node* ret; |
341 | const auto unique_name = scope.GetUniqueNameForOp("StringSplitV2" ); |
342 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringSplitV2" ) |
343 | .Input(_input) |
344 | .Input(_sep) |
345 | .Attr("maxsplit" , attrs.maxsplit_) |
346 | ; |
347 | scope.UpdateBuilder(&builder); |
348 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
349 | if (!scope.ok()) return; |
350 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
351 | this->operation = Operation(ret); |
352 | ::tensorflow::NameRangeMap _outputs_range; |
353 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
354 | if (!_status_.ok()) { |
355 | scope.UpdateStatus(_status_); |
356 | return; |
357 | } |
358 | |
359 | this->indices = Output(ret, _outputs_range["indices" ].first); |
360 | this->values = Output(ret, _outputs_range["values" ].first); |
361 | this->shape = Output(ret, _outputs_range["shape" ].first); |
362 | } |
363 | |
364 | StringSplitV2::StringSplitV2(const ::tensorflow::Scope& scope, |
365 | ::tensorflow::Input input, ::tensorflow::Input |
366 | sep) |
367 | : StringSplitV2(scope, input, sep, StringSplitV2::Attrs()) {} |
368 | |
369 | StringStrip::StringStrip(const ::tensorflow::Scope& scope, ::tensorflow::Input |
370 | input) { |
371 | if (!scope.ok()) return; |
372 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
373 | if (!scope.ok()) return; |
374 | ::tensorflow::Node* ret; |
375 | const auto unique_name = scope.GetUniqueNameForOp("StringStrip" ); |
376 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringStrip" ) |
377 | .Input(_input) |
378 | ; |
379 | scope.UpdateBuilder(&builder); |
380 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
381 | if (!scope.ok()) return; |
382 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
383 | this->operation = Operation(ret); |
384 | this->output = Output(ret, 0); |
385 | } |
386 | |
387 | StringToHashBucket::StringToHashBucket(const ::tensorflow::Scope& scope, |
388 | ::tensorflow::Input string_tensor, int64 |
389 | num_buckets) { |
390 | if (!scope.ok()) return; |
391 | auto _string_tensor = ::tensorflow::ops::AsNodeOut(scope, string_tensor); |
392 | if (!scope.ok()) return; |
393 | ::tensorflow::Node* ret; |
394 | const auto unique_name = scope.GetUniqueNameForOp("StringToHashBucket" ); |
395 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringToHashBucket" ) |
396 | .Input(_string_tensor) |
397 | .Attr("num_buckets" , num_buckets) |
398 | ; |
399 | scope.UpdateBuilder(&builder); |
400 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
401 | if (!scope.ok()) return; |
402 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
403 | this->operation = Operation(ret); |
404 | this->output = Output(ret, 0); |
405 | } |
406 | |
407 | StringToHashBucketFast::StringToHashBucketFast(const ::tensorflow::Scope& |
408 | scope, ::tensorflow::Input |
409 | input, int64 num_buckets) { |
410 | if (!scope.ok()) return; |
411 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
412 | if (!scope.ok()) return; |
413 | ::tensorflow::Node* ret; |
414 | const auto unique_name = scope.GetUniqueNameForOp("StringToHashBucketFast" ); |
415 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringToHashBucketFast" ) |
416 | .Input(_input) |
417 | .Attr("num_buckets" , num_buckets) |
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 | this->output = Output(ret, 0); |
425 | } |
426 | |
427 | StringToHashBucketStrong::StringToHashBucketStrong(const ::tensorflow::Scope& |
428 | scope, ::tensorflow::Input |
429 | input, int64 num_buckets, |
430 | const gtl::ArraySlice<int>& |
431 | key) { |
432 | if (!scope.ok()) return; |
433 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
434 | if (!scope.ok()) return; |
435 | ::tensorflow::Node* ret; |
436 | const auto unique_name = scope.GetUniqueNameForOp("StringToHashBucketStrong" ); |
437 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringToHashBucketStrong" ) |
438 | .Input(_input) |
439 | .Attr("num_buckets" , num_buckets) |
440 | .Attr("key" , key) |
441 | ; |
442 | scope.UpdateBuilder(&builder); |
443 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
444 | if (!scope.ok()) return; |
445 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
446 | this->operation = Operation(ret); |
447 | this->output = Output(ret, 0); |
448 | } |
449 | |
450 | StringUpper::StringUpper(const ::tensorflow::Scope& scope, ::tensorflow::Input |
451 | input, const StringUpper::Attrs& attrs) { |
452 | if (!scope.ok()) return; |
453 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
454 | if (!scope.ok()) return; |
455 | ::tensorflow::Node* ret; |
456 | const auto unique_name = scope.GetUniqueNameForOp("StringUpper" ); |
457 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StringUpper" ) |
458 | .Input(_input) |
459 | .Attr("encoding" , attrs.encoding_) |
460 | ; |
461 | scope.UpdateBuilder(&builder); |
462 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
463 | if (!scope.ok()) return; |
464 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
465 | this->operation = Operation(ret); |
466 | this->output = Output(ret, 0); |
467 | } |
468 | |
469 | StringUpper::StringUpper(const ::tensorflow::Scope& scope, ::tensorflow::Input |
470 | input) |
471 | : StringUpper(scope, input, StringUpper::Attrs()) {} |
472 | |
473 | Substr::Substr(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
474 | ::tensorflow::Input pos, ::tensorflow::Input len, const |
475 | Substr::Attrs& attrs) { |
476 | if (!scope.ok()) return; |
477 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
478 | if (!scope.ok()) return; |
479 | auto _pos = ::tensorflow::ops::AsNodeOut(scope, pos); |
480 | if (!scope.ok()) return; |
481 | auto _len = ::tensorflow::ops::AsNodeOut(scope, len); |
482 | if (!scope.ok()) return; |
483 | ::tensorflow::Node* ret; |
484 | const auto unique_name = scope.GetUniqueNameForOp("Substr" ); |
485 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Substr" ) |
486 | .Input(_input) |
487 | .Input(_pos) |
488 | .Input(_len) |
489 | .Attr("unit" , attrs.unit_) |
490 | ; |
491 | scope.UpdateBuilder(&builder); |
492 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
493 | if (!scope.ok()) return; |
494 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
495 | this->operation = Operation(ret); |
496 | this->output = Output(ret, 0); |
497 | } |
498 | |
499 | Substr::Substr(const ::tensorflow::Scope& scope, ::tensorflow::Input input, |
500 | ::tensorflow::Input pos, ::tensorflow::Input len) |
501 | : Substr(scope, input, pos, len, Substr::Attrs()) {} |
502 | |
503 | UnicodeScript::UnicodeScript(const ::tensorflow::Scope& scope, |
504 | ::tensorflow::Input input) { |
505 | if (!scope.ok()) return; |
506 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
507 | if (!scope.ok()) return; |
508 | ::tensorflow::Node* ret; |
509 | const auto unique_name = scope.GetUniqueNameForOp("UnicodeScript" ); |
510 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnicodeScript" ) |
511 | .Input(_input) |
512 | ; |
513 | scope.UpdateBuilder(&builder); |
514 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
515 | if (!scope.ok()) return; |
516 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
517 | this->operation = Operation(ret); |
518 | this->output = Output(ret, 0); |
519 | } |
520 | |
521 | UnicodeTranscode::UnicodeTranscode(const ::tensorflow::Scope& scope, |
522 | ::tensorflow::Input input, StringPiece |
523 | input_encoding, StringPiece output_encoding, |
524 | const UnicodeTranscode::Attrs& attrs) { |
525 | if (!scope.ok()) return; |
526 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
527 | if (!scope.ok()) return; |
528 | ::tensorflow::Node* ret; |
529 | const auto unique_name = scope.GetUniqueNameForOp("UnicodeTranscode" ); |
530 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnicodeTranscode" ) |
531 | .Input(_input) |
532 | .Attr("input_encoding" , input_encoding) |
533 | .Attr("output_encoding" , output_encoding) |
534 | .Attr("errors" , attrs.errors_) |
535 | .Attr("replacement_char" , attrs.replacement_char_) |
536 | .Attr("replace_control_characters" , attrs.replace_control_characters_) |
537 | ; |
538 | scope.UpdateBuilder(&builder); |
539 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
540 | if (!scope.ok()) return; |
541 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
542 | this->operation = Operation(ret); |
543 | this->output = Output(ret, 0); |
544 | } |
545 | |
546 | UnicodeTranscode::UnicodeTranscode(const ::tensorflow::Scope& scope, |
547 | ::tensorflow::Input input, StringPiece |
548 | input_encoding, StringPiece output_encoding) |
549 | : UnicodeTranscode(scope, input, input_encoding, output_encoding, UnicodeTranscode::Attrs()) {} |
550 | |
551 | /// @} |
552 | |
553 | } // namespace ops |
554 | } // namespace tensorflow |
555 | |