1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | |
4 | #include "tensorflow/cc/ops/const_op.h" |
5 | #include "tensorflow/cc/ops/lookup_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 | AnonymousHashTable::AnonymousHashTable(const ::tensorflow::Scope& scope, |
14 | DataType key_dtype, DataType |
15 | value_dtype) { |
16 | if (!scope.ok()) return; |
17 | ::tensorflow::Node* ret; |
18 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousHashTable" ); |
19 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousHashTable" ) |
20 | .Attr("key_dtype" , key_dtype) |
21 | .Attr("value_dtype" , value_dtype) |
22 | ; |
23 | scope.UpdateBuilder(&builder); |
24 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
25 | if (!scope.ok()) return; |
26 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
27 | this->operation = Operation(ret); |
28 | this->table_handle = Output(ret, 0); |
29 | } |
30 | |
31 | AnonymousMutableDenseHashTable::AnonymousMutableDenseHashTable(const |
32 | ::tensorflow::Scope& |
33 | scope, |
34 | ::tensorflow::Input |
35 | empty_key, |
36 | ::tensorflow::Input |
37 | deleted_key, |
38 | DataType |
39 | value_dtype, |
40 | const |
41 | AnonymousMutableDenseHashTable::Attrs& |
42 | attrs) { |
43 | if (!scope.ok()) return; |
44 | auto _empty_key = ::tensorflow::ops::AsNodeOut(scope, empty_key); |
45 | if (!scope.ok()) return; |
46 | auto _deleted_key = ::tensorflow::ops::AsNodeOut(scope, deleted_key); |
47 | if (!scope.ok()) return; |
48 | ::tensorflow::Node* ret; |
49 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMutableDenseHashTable" ); |
50 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMutableDenseHashTable" ) |
51 | .Input(_empty_key) |
52 | .Input(_deleted_key) |
53 | .Attr("value_dtype" , value_dtype) |
54 | .Attr("value_shape" , attrs.value_shape_) |
55 | .Attr("initial_num_buckets" , attrs.initial_num_buckets_) |
56 | .Attr("max_load_factor" , attrs.max_load_factor_) |
57 | ; |
58 | scope.UpdateBuilder(&builder); |
59 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
60 | if (!scope.ok()) return; |
61 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
62 | this->operation = Operation(ret); |
63 | this->table_handle = Output(ret, 0); |
64 | } |
65 | |
66 | AnonymousMutableDenseHashTable::AnonymousMutableDenseHashTable(const |
67 | ::tensorflow::Scope& |
68 | scope, |
69 | ::tensorflow::Input |
70 | empty_key, |
71 | ::tensorflow::Input |
72 | deleted_key, |
73 | DataType |
74 | value_dtype) |
75 | : AnonymousMutableDenseHashTable(scope, empty_key, deleted_key, value_dtype, AnonymousMutableDenseHashTable::Attrs()) {} |
76 | |
77 | AnonymousMutableHashTable::AnonymousMutableHashTable(const ::tensorflow::Scope& |
78 | scope, DataType key_dtype, |
79 | DataType value_dtype) { |
80 | if (!scope.ok()) return; |
81 | ::tensorflow::Node* ret; |
82 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMutableHashTable" ); |
83 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMutableHashTable" ) |
84 | .Attr("key_dtype" , key_dtype) |
85 | .Attr("value_dtype" , value_dtype) |
86 | ; |
87 | scope.UpdateBuilder(&builder); |
88 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
89 | if (!scope.ok()) return; |
90 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
91 | this->operation = Operation(ret); |
92 | this->table_handle = Output(ret, 0); |
93 | } |
94 | |
95 | AnonymousMutableHashTableOfTensors::AnonymousMutableHashTableOfTensors(const |
96 | ::tensorflow::Scope& |
97 | scope, |
98 | DataType |
99 | key_dtype, |
100 | DataType |
101 | value_dtype, |
102 | const |
103 | AnonymousMutableHashTableOfTensors::Attrs& |
104 | attrs) { |
105 | if (!scope.ok()) return; |
106 | ::tensorflow::Node* ret; |
107 | const auto unique_name = scope.GetUniqueNameForOp("AnonymousMutableHashTableOfTensors" ); |
108 | auto builder = ::tensorflow::NodeBuilder(unique_name, "AnonymousMutableHashTableOfTensors" ) |
109 | .Attr("key_dtype" , key_dtype) |
110 | .Attr("value_dtype" , value_dtype) |
111 | .Attr("value_shape" , attrs.value_shape_) |
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->table_handle = Output(ret, 0); |
119 | } |
120 | |
121 | AnonymousMutableHashTableOfTensors::AnonymousMutableHashTableOfTensors(const |
122 | ::tensorflow::Scope& |
123 | scope, |
124 | DataType |
125 | key_dtype, |
126 | DataType |
127 | value_dtype) |
128 | : AnonymousMutableHashTableOfTensors(scope, key_dtype, value_dtype, AnonymousMutableHashTableOfTensors::Attrs()) {} |
129 | |
130 | LookupTableRemove::LookupTableRemove(const ::tensorflow::Scope& scope, |
131 | ::tensorflow::Input table_handle, |
132 | ::tensorflow::Input keys) { |
133 | if (!scope.ok()) return; |
134 | auto _table_handle = ::tensorflow::ops::AsNodeOut(scope, table_handle); |
135 | if (!scope.ok()) return; |
136 | auto _keys = ::tensorflow::ops::AsNodeOut(scope, keys); |
137 | if (!scope.ok()) return; |
138 | ::tensorflow::Node* ret; |
139 | const auto unique_name = scope.GetUniqueNameForOp("LookupTableRemove" ); |
140 | auto builder = ::tensorflow::NodeBuilder(unique_name, "LookupTableRemoveV2" ) |
141 | .Input(_table_handle) |
142 | .Input(_keys) |
143 | ; |
144 | scope.UpdateBuilder(&builder); |
145 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
146 | if (!scope.ok()) return; |
147 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
148 | this->operation = Operation(ret); |
149 | return; |
150 | } |
151 | |
152 | } // namespace internal |
153 | } // namespace ops |
154 | } // namespace tensorflow |
155 | |