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_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 | Enter::Enter(const ::tensorflow::Scope& scope, ::tensorflow::Input data, |
14 | StringPiece frame_name, const Enter::Attrs& attrs) { |
15 | if (!scope.ok()) return; |
16 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
17 | if (!scope.ok()) return; |
18 | ::tensorflow::Node* ret; |
19 | const auto unique_name = scope.GetUniqueNameForOp("Enter" ); |
20 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Enter" ) |
21 | .Input(_data) |
22 | .Attr("frame_name" , frame_name) |
23 | .Attr("is_constant" , attrs.is_constant_) |
24 | .Attr("parallel_iterations" , attrs.parallel_iterations_) |
25 | ; |
26 | scope.UpdateBuilder(&builder); |
27 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
28 | if (!scope.ok()) return; |
29 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
30 | this->operation = Operation(ret); |
31 | this->output = Output(ret, 0); |
32 | } |
33 | |
34 | Enter::Enter(const ::tensorflow::Scope& scope, ::tensorflow::Input data, |
35 | StringPiece frame_name) |
36 | : Enter(scope, data, frame_name, Enter::Attrs()) {} |
37 | |
38 | Exit::Exit(const ::tensorflow::Scope& scope, ::tensorflow::Input data) { |
39 | if (!scope.ok()) return; |
40 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
41 | if (!scope.ok()) return; |
42 | ::tensorflow::Node* ret; |
43 | const auto unique_name = scope.GetUniqueNameForOp("Exit" ); |
44 | auto builder = ::tensorflow::NodeBuilder(unique_name, "Exit" ) |
45 | .Input(_data) |
46 | ; |
47 | scope.UpdateBuilder(&builder); |
48 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
49 | if (!scope.ok()) return; |
50 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
51 | this->operation = Operation(ret); |
52 | this->output = Output(ret, 0); |
53 | } |
54 | |
55 | RefEnter::RefEnter(const ::tensorflow::Scope& scope, ::tensorflow::Input data, |
56 | StringPiece frame_name, const RefEnter::Attrs& attrs) { |
57 | if (!scope.ok()) return; |
58 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
59 | if (!scope.ok()) return; |
60 | ::tensorflow::Node* ret; |
61 | const auto unique_name = scope.GetUniqueNameForOp("RefEnter" ); |
62 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefEnter" ) |
63 | .Input(_data) |
64 | .Attr("frame_name" , frame_name) |
65 | .Attr("is_constant" , attrs.is_constant_) |
66 | .Attr("parallel_iterations" , attrs.parallel_iterations_) |
67 | ; |
68 | scope.UpdateBuilder(&builder); |
69 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
70 | if (!scope.ok()) return; |
71 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
72 | this->operation = Operation(ret); |
73 | this->output = Output(ret, 0); |
74 | } |
75 | |
76 | RefEnter::RefEnter(const ::tensorflow::Scope& scope, ::tensorflow::Input data, |
77 | StringPiece frame_name) |
78 | : RefEnter(scope, data, frame_name, RefEnter::Attrs()) {} |
79 | |
80 | RefExit::RefExit(const ::tensorflow::Scope& scope, ::tensorflow::Input data) { |
81 | if (!scope.ok()) return; |
82 | auto _data = ::tensorflow::ops::AsNodeOut(scope, data); |
83 | if (!scope.ok()) return; |
84 | ::tensorflow::Node* ret; |
85 | const auto unique_name = scope.GetUniqueNameForOp("RefExit" ); |
86 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefExit" ) |
87 | .Input(_data) |
88 | ; |
89 | scope.UpdateBuilder(&builder); |
90 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
91 | if (!scope.ok()) return; |
92 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
93 | this->operation = Operation(ret); |
94 | this->output = Output(ret, 0); |
95 | } |
96 | |
97 | RefMerge::RefMerge(const ::tensorflow::Scope& scope, ::tensorflow::InputList |
98 | inputs) { |
99 | if (!scope.ok()) return; |
100 | auto _inputs = ::tensorflow::ops::AsNodeOutList(scope, inputs); |
101 | if (!scope.ok()) return; |
102 | ::tensorflow::Node* ret; |
103 | const auto unique_name = scope.GetUniqueNameForOp("RefMerge" ); |
104 | auto builder = ::tensorflow::NodeBuilder(unique_name, "RefMerge" ) |
105 | .Input(_inputs) |
106 | ; |
107 | scope.UpdateBuilder(&builder); |
108 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
109 | if (!scope.ok()) return; |
110 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
111 | this->operation = Operation(ret); |
112 | ::tensorflow::NameRangeMap _outputs_range; |
113 | ::tensorflow::Status _status_ = ::tensorflow::NameRangesForNode(*ret, ret->op_def(), nullptr, &_outputs_range); |
114 | if (!_status_.ok()) { |
115 | scope.UpdateStatus(_status_); |
116 | return; |
117 | } |
118 | |
119 | this->output = Output(ret, _outputs_range["output" ].first); |
120 | this->value_index = Output(ret, _outputs_range["value_index" ].first); |
121 | } |
122 | |
123 | } // namespace internal |
124 | } // namespace ops |
125 | } // namespace tensorflow |
126 | |