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

Function GetLookupTable

tensorflow/core/kernels/lookup_util.cc:276–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274} // namespace
275
276Status GetLookupTable(const string& input_name, OpKernelContext* ctx,
277 LookupInterface** table) {
278 string container;
279 string table_handle;
280 DataType handle_dtype;
281 TF_RETURN_IF_ERROR(ctx->input_dtype(input_name, &handle_dtype));
282 if (handle_dtype == DT_RESOURCE) {
283 ResourceHandle handle;
284 TF_RETURN_IF_ERROR(HandleFromInput(ctx, input_name, &handle));
285 return LookupResource(ctx, handle, table);
286 } else {
287 TF_RETURN_IF_ERROR(
288 GetTableHandle(input_name, ctx, &container, &table_handle));
289 return ctx->resource_manager()->Lookup(container, table_handle, table);
290 }
291}
292
293Status GetInitializableLookupTable(const string& input_name,
294 OpKernelContext* ctx,

Callers 6

ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85
ComputeMethod · 0.85

Calls 6

HandleFromInputFunction · 0.85
LookupResourceFunction · 0.85
GetTableHandleFunction · 0.85
input_dtypeMethod · 0.45
LookupMethod · 0.45
resource_managerMethod · 0.45

Tested by

no test coverage detected