MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Eval

Function Eval

tensorflow/lite/kernels/lsh_projection.cc:171–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
172 auto* params =
173 reinterpret_cast<TfLiteLSHProjectionParams*>(node->builtin_data);
174
175 int32_t* out_buf = GetOutput(context, node, 0)->data.i32;
176 const TfLiteTensor* hash = GetInput(context, node, 0);
177 const TfLiteTensor* input = GetInput(context, node, 1);
178 const TfLiteTensor* weight =
179 NumInputs(node) == 2 ? nullptr : GetInput(context, node, 2);
180
181 switch (params->type) {
182 case kTfLiteLshProjectionDense:
183 DenseLshProjection(hash, input, weight, out_buf);
184 break;
185 case kTfLiteLshProjectionSparse:
186 SparseLshProjection(hash, input, weight, out_buf);
187 break;
188 default:
189 return kTfLiteError;
190 }
191
192 return kTfLiteOk;
193}
194} // namespace lsh_projection
195
196TfLiteRegistration* Register_LSH_PROJECTION() {

Callers

nothing calls this directly

Calls 5

GetOutputFunction · 0.85
GetInputFunction · 0.85
NumInputsFunction · 0.85
DenseLshProjectionFunction · 0.85
SparseLshProjectionFunction · 0.85

Tested by

no test coverage detected