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_internal.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | namespace internal { |
10 | // NOTE: This namespace has internal TensorFlow details that |
11 | // are not part of TensorFlow's public API. |
12 | |
13 | StaticRegexFullMatch::StaticRegexFullMatch(const ::tensorflow::Scope& scope, |
14 | ::tensorflow::Input input, |
15 | StringPiece pattern) { |
16 | if (!scope.ok()) return; |
17 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
18 | if (!scope.ok()) return; |
19 | ::tensorflow::Node* ret; |
20 | const auto unique_name = scope.GetUniqueNameForOp("StaticRegexFullMatch" ); |
21 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StaticRegexFullMatch" ) |
22 | .Input(_input) |
23 | .Attr("pattern" , pattern) |
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 | StaticRegexReplace::StaticRegexReplace(const ::tensorflow::Scope& scope, |
34 | ::tensorflow::Input input, StringPiece |
35 | pattern, StringPiece rewrite, const |
36 | StaticRegexReplace::Attrs& attrs) { |
37 | if (!scope.ok()) return; |
38 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
39 | if (!scope.ok()) return; |
40 | ::tensorflow::Node* ret; |
41 | const auto unique_name = scope.GetUniqueNameForOp("StaticRegexReplace" ); |
42 | auto builder = ::tensorflow::NodeBuilder(unique_name, "StaticRegexReplace" ) |
43 | .Input(_input) |
44 | .Attr("pattern" , pattern) |
45 | .Attr("rewrite" , rewrite) |
46 | .Attr("replace_global" , attrs.replace_global_) |
47 | ; |
48 | scope.UpdateBuilder(&builder); |
49 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
50 | if (!scope.ok()) return; |
51 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
52 | this->operation = Operation(ret); |
53 | this->output = Output(ret, 0); |
54 | } |
55 | |
56 | StaticRegexReplace::StaticRegexReplace(const ::tensorflow::Scope& scope, |
57 | ::tensorflow::Input input, StringPiece |
58 | pattern, StringPiece rewrite) |
59 | : StaticRegexReplace(scope, input, pattern, rewrite, StaticRegexReplace::Attrs()) {} |
60 | |
61 | UnicodeDecode::UnicodeDecode(const ::tensorflow::Scope& scope, |
62 | ::tensorflow::Input input, StringPiece |
63 | input_encoding, const UnicodeDecode::Attrs& attrs) { |
64 | if (!scope.ok()) return; |
65 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
66 | if (!scope.ok()) return; |
67 | ::tensorflow::Node* ret; |
68 | const auto unique_name = scope.GetUniqueNameForOp("UnicodeDecode" ); |
69 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnicodeDecode" ) |
70 | .Input(_input) |
71 | .Attr("input_encoding" , input_encoding) |
72 | .Attr("errors" , attrs.errors_) |
73 | .Attr("replacement_char" , attrs.replacement_char_) |
74 | .Attr("replace_control_characters" , attrs.replace_control_characters_) |
75 | .Attr("Tsplits" , attrs.Tsplits_) |
76 | ; |
77 | scope.UpdateBuilder(&builder); |
78 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
79 | if (!scope.ok()) return; |
80 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
81 | this->operation = Operation(ret); |
82 | ::tensorflow::NameRangeMap _outputs_range; |
83 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
84 | if (!_status_.ok()) { |
85 | scope.UpdateStatus(_status_); |
86 | return; |
87 | } |
88 | |
89 | this->row_splits = Output(ret, _outputs_range["row_splits" ].first); |
90 | this->char_values = Output(ret, _outputs_range["char_values" ].first); |
91 | } |
92 | |
93 | UnicodeDecode::UnicodeDecode(const ::tensorflow::Scope& scope, |
94 | ::tensorflow::Input input, StringPiece |
95 | input_encoding) |
96 | : UnicodeDecode(scope, input, input_encoding, UnicodeDecode::Attrs()) {} |
97 | |
98 | UnicodeDecodeWithOffsets::UnicodeDecodeWithOffsets(const ::tensorflow::Scope& |
99 | scope, ::tensorflow::Input |
100 | input, StringPiece |
101 | input_encoding, const |
102 | UnicodeDecodeWithOffsets::Attrs& |
103 | attrs) { |
104 | if (!scope.ok()) return; |
105 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
106 | if (!scope.ok()) return; |
107 | ::tensorflow::Node* ret; |
108 | const auto unique_name = scope.GetUniqueNameForOp("UnicodeDecodeWithOffsets" ); |
109 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnicodeDecodeWithOffsets" ) |
110 | .Input(_input) |
111 | .Attr("input_encoding" , input_encoding) |
112 | .Attr("errors" , attrs.errors_) |
113 | .Attr("replacement_char" , attrs.replacement_char_) |
114 | .Attr("replace_control_characters" , attrs.replace_control_characters_) |
115 | .Attr("Tsplits" , attrs.Tsplits_) |
116 | ; |
117 | scope.UpdateBuilder(&builder); |
118 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
119 | if (!scope.ok()) return; |
120 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
121 | this->operation = Operation(ret); |
122 | ::tensorflow::NameRangeMap _outputs_range; |
123 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
124 | if (!_status_.ok()) { |
125 | scope.UpdateStatus(_status_); |
126 | return; |
127 | } |
128 | |
129 | this->row_splits = Output(ret, _outputs_range["row_splits" ].first); |
130 | this->char_values = Output(ret, _outputs_range["char_values" ].first); |
131 | this->char_to_byte_starts = Output(ret, _outputs_range["char_to_byte_starts" ].first); |
132 | } |
133 | |
134 | UnicodeDecodeWithOffsets::UnicodeDecodeWithOffsets(const ::tensorflow::Scope& |
135 | scope, ::tensorflow::Input |
136 | input, StringPiece |
137 | input_encoding) |
138 | : UnicodeDecodeWithOffsets(scope, input, input_encoding, UnicodeDecodeWithOffsets::Attrs()) {} |
139 | |
140 | UnicodeEncode::UnicodeEncode(const ::tensorflow::Scope& scope, |
141 | ::tensorflow::Input input_values, |
142 | ::tensorflow::Input input_splits, StringPiece |
143 | output_encoding, const UnicodeEncode::Attrs& |
144 | attrs) { |
145 | if (!scope.ok()) return; |
146 | auto _input_values = ::tensorflow::ops::AsNodeOut(scope, input_values); |
147 | if (!scope.ok()) return; |
148 | auto _input_splits = ::tensorflow::ops::AsNodeOut(scope, input_splits); |
149 | if (!scope.ok()) return; |
150 | ::tensorflow::Node* ret; |
151 | const auto unique_name = scope.GetUniqueNameForOp("UnicodeEncode" ); |
152 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnicodeEncode" ) |
153 | .Input(_input_values) |
154 | .Input(_input_splits) |
155 | .Attr("errors" , attrs.errors_) |
156 | .Attr("output_encoding" , output_encoding) |
157 | .Attr("replacement_char" , attrs.replacement_char_) |
158 | ; |
159 | scope.UpdateBuilder(&builder); |
160 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
161 | if (!scope.ok()) return; |
162 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
163 | this->operation = Operation(ret); |
164 | this->output = Output(ret, 0); |
165 | } |
166 | |
167 | UnicodeEncode::UnicodeEncode(const ::tensorflow::Scope& scope, |
168 | ::tensorflow::Input input_values, |
169 | ::tensorflow::Input input_splits, StringPiece |
170 | output_encoding) |
171 | : UnicodeEncode(scope, input_values, input_splits, output_encoding, UnicodeEncode::Attrs()) {} |
172 | |
173 | UnsortedSegmentJoin::UnsortedSegmentJoin(const ::tensorflow::Scope& scope, |
174 | ::tensorflow::Input inputs, |
175 | ::tensorflow::Input segment_ids, |
176 | ::tensorflow::Input num_segments, |
177 | const UnsortedSegmentJoin::Attrs& |
178 | attrs) { |
179 | if (!scope.ok()) return; |
180 | auto _inputs = ::tensorflow::ops::AsNodeOut(scope, inputs); |
181 | if (!scope.ok()) return; |
182 | auto _segment_ids = ::tensorflow::ops::AsNodeOut(scope, segment_ids); |
183 | if (!scope.ok()) return; |
184 | auto _num_segments = ::tensorflow::ops::AsNodeOut(scope, num_segments); |
185 | if (!scope.ok()) return; |
186 | ::tensorflow::Node* ret; |
187 | const auto unique_name = scope.GetUniqueNameForOp("UnsortedSegmentJoin" ); |
188 | auto builder = ::tensorflow::NodeBuilder(unique_name, "UnsortedSegmentJoin" ) |
189 | .Input(_inputs) |
190 | .Input(_segment_ids) |
191 | .Input(_num_segments) |
192 | .Attr("separator" , attrs.separator_) |
193 | ; |
194 | scope.UpdateBuilder(&builder); |
195 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
196 | if (!scope.ok()) return; |
197 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
198 | this->operation = Operation(ret); |
199 | this->output = Output(ret, 0); |
200 | } |
201 | |
202 | UnsortedSegmentJoin::UnsortedSegmentJoin(const ::tensorflow::Scope& scope, |
203 | ::tensorflow::Input inputs, |
204 | ::tensorflow::Input segment_ids, |
205 | ::tensorflow::Input num_segments) |
206 | : UnsortedSegmentJoin(scope, inputs, segment_ids, num_segments, UnsortedSegmentJoin::Attrs()) {} |
207 | |
208 | } // namespace internal |
209 | } // namespace ops |
210 | } // namespace tensorflow |
211 | |