1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/control_flow_ops.h" |
6 | |
7 | namespace tensorflow { |
8 | namespace ops { |
9 | |
10 | Abort::Abort(const ::tensorflow::Scope& scope, const Abort::Attrs& attrs) { |
11 | if (!scope.ok()) return; |
12 | ::tensorflow::Node* ret; |
13 | const auto unique_name = scope.GetUniqueNameForOp("Abort" ); |
14 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Abort" ) |
15 | .Attr("error_msg" , attrs.error_msg_) |
16 | .Attr("exit_without_error" , attrs.exit_without_error_) |
17 | ; |
18 | scope.UpdateBuilder(&builder); |
19 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
20 | if (!scope.ok()) return; |
21 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
22 | this->operation = Operation(ret); |
23 | return; |
24 | } |
25 | |
26 | Abort::Abort(const ::tensorflow::Scope& scope) |
27 | : Abort(scope, Abort::Attrs()) {} |
28 | |
29 | ControlTrigger::ControlTrigger(const ::tensorflow::Scope& scope) { |
30 | if (!scope.ok()) return; |
31 | ::tensorflow::Node* ret; |
32 | const auto unique_name = scope.GetUniqueNameForOp("ControlTrigger" ); |
33 | auto builder = ::tensorflow::NodeBuilder(unique_name, "ControlTrigger" ) |
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 | return; |
41 | } |
42 | |
43 | LoopCond::LoopCond(const ::tensorflow::Scope& scope, ::tensorflow::Input input) { |
44 | if (!scope.ok()) return; |
45 | auto _input = ::tensorflow::ops::AsNodeOut(scope, input); |
46 | if (!scope.ok()) return; |
47 | ::tensorflow::Node* ret; |
48 | const auto unique_name = scope.GetUniqueNameForOp("LoopCond" ); |
49 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LoopCond" ) |
50 | .Input(_input) |
51 | ; |
52 | scope.UpdateBuilder(&builder); |
53 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
54 | if (!scope.ok()) return; |
55 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
56 | this->operation = Operation(ret); |
57 | this->output = Output(ret, 0); |
58 | } |
59 | |
60 | Merge::Merge(const ::tensorflow::Scope& scope, ::tensorflow::InputList inputs) { |
61 | if (!scope.ok()) return; |
62 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
63 | if (!scope.ok()) return; |
64 | ::tensorflow::Node* ret; |
65 | const auto unique_name = scope.GetUniqueNameForOp("Merge" ); |
66 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Merge" ) |
67 | .Input(_inputs) |
68 | ; |
69 | scope.UpdateBuilder(&builder); |
70 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
71 | if (!scope.ok()) return; |
72 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
73 | this->operation = Operation(ret); |
74 | ::tensorflow::NameRangeMap _outputs_range; |
75 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
76 | if (!_status_.ok()) { |
77 | scope.UpdateStatus(_status_); |
78 | return; |
79 | } |
80 | |
81 | this->output = Output(ret, _outputs_range["output" ].first); |
82 | this->value_index = Output(ret, _outputs_range["value_index" ].first); |
83 | } |
84 | |
85 | NextIteration::NextIteration(const ::tensorflow::Scope& scope, |
86 | ::tensorflow::Input data) { |
87 | if (!scope.ok()) return; |
88 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
89 | if (!scope.ok()) return; |
90 | ::tensorflow::Node* ret; |
91 | const auto unique_name = scope.GetUniqueNameForOp("NextIteration" ); |
92 | auto builder = ::tensorflow::NodeBuilder(unique_name, "NextIteration" ) |
93 | .Input(_data) |
94 | ; |
95 | scope.UpdateBuilder(&builder); |
96 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
97 | if (!scope.ok()) return; |
98 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
99 | this->operation = Operation(ret); |
100 | this->output = Output(ret, 0); |
101 | } |
102 | |
103 | RefNextIteration::RefNextIteration(const ::tensorflow::Scope& scope, |
104 | ::tensorflow::Input data) { |
105 | if (!scope.ok()) return; |
106 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
107 | if (!scope.ok()) return; |
108 | ::tensorflow::Node* ret; |
109 | const auto unique_name = scope.GetUniqueNameForOp("RefNextIteration" ); |
110 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefNextIteration" ) |
111 | .Input(_data) |
112 | ; |
113 | scope.UpdateBuilder(&builder); |
114 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
115 | if (!scope.ok()) return; |
116 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
117 | this->operation = Operation(ret); |
118 | this->output = Output(ret, 0); |
119 | } |
120 | |
121 | RefSelect::RefSelect(const ::tensorflow::Scope& scope, ::tensorflow::Input |
122 | index, ::tensorflow::InputList inputs) { |
123 | if (!scope.ok()) return; |
124 | auto _index = ::tensorflow::ops::AsNodeOut(scope, index); |
125 | if (!scope.ok()) return; |
126 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
127 | if (!scope.ok()) return; |
128 | ::tensorflow::Node* ret; |
129 | const auto unique_name = scope.GetUniqueNameForOp("RefSelect" ); |
130 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefSelect" ) |
131 | .Input(_index) |
132 | .Input(_inputs) |
133 | ; |
134 | scope.UpdateBuilder(&builder); |
135 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
136 | if (!scope.ok()) return; |
137 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
138 | this->operation = Operation(ret); |
139 | this->output = Output(ret, 0); |
140 | } |
141 | |
142 | RefSwitch::RefSwitch(const ::tensorflow::Scope& scope, ::tensorflow::Input |
143 | data, ::tensorflow::Input pred) { |
144 | if (!scope.ok()) return; |
145 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
146 | if (!scope.ok()) return; |
147 | auto _pred = ::tensorflow::ops::AsNodeOut(scope, pred); |
148 | if (!scope.ok()) return; |
149 | ::tensorflow::Node* ret; |
150 | const auto unique_name = scope.GetUniqueNameForOp("RefSwitch" ); |
151 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefSwitch" ) |
152 | .Input(_data) |
153 | .Input(_pred) |
154 | ; |
155 | scope.UpdateBuilder(&builder); |
156 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
157 | if (!scope.ok()) return; |
158 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
159 | this->operation = Operation(ret); |
160 | ::tensorflow::NameRangeMap _outputs_range; |
161 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
162 | if (!_status_.ok()) { |
163 | scope.UpdateStatus(_status_); |
164 | return; |
165 | } |
166 | |
167 | this->output_false = Output(ret, _outputs_range["output_false" ].first); |
168 | this->output_true = Output(ret, _outputs_range["output_true" ].first); |
169 | } |
170 | |
171 | Switch::Switch(const ::tensorflow::Scope& scope, ::tensorflow::Input data, |
172 | ::tensorflow::Input pred) { |
173 | if (!scope.ok()) return; |
174 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
175 | if (!scope.ok()) return; |
176 | auto _pred = ::tensorflow::ops::AsNodeOut(scope, pred); |
177 | if (!scope.ok()) return; |
178 | ::tensorflow::Node* ret; |
179 | const auto unique_name = scope.GetUniqueNameForOp("Switch" ); |
180 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Switch" ) |
181 | .Input(_data) |
182 | .Input(_pred) |
183 | ; |
184 | scope.UpdateBuilder(&builder); |
185 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
186 | if (!scope.ok()) return; |
187 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
188 | this->operation = Operation(ret); |
189 | ::tensorflow::NameRangeMap _outputs_range; |
190 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
191 | if (!_status_.ok()) { |
192 | scope.UpdateStatus(_status_); |
193 | return; |
194 | } |
195 | |
196 | this->output_false = Output(ret, _outputs_range["output_false" ].first); |
197 | this->output_true = Output(ret, _outputs_range["output_true" ].first); |
198 | } |
199 | |
200 | /// @} |
201 | |
202 | } // namespace ops |
203 | } // namespace tensorflow |
204 | |