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

Method DoFind

tensorflow/core/kernels/lookup_table_op.h:250–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 }
249
250 Status DoFind(const Tensor& key, Tensor* value,
251 const Tensor& default_value) override {
252 const V default_val = default_value.flat<V>()(0);
253 const auto key_values = key.flat<K>();
254 auto value_values = value->flat<V>();
255
256 for (int64 i = 0; i < key_values.size(); ++i) {
257 value_values(i) = gtl::FindWithDefault(
258 *table_, SubtleMustCopyIfIntegral(key_values(i)), default_val);
259 }
260 return Status::OK();
261 }
262
263 int64 MemoryUsed() const override {
264 if (table_) {

Callers

nothing calls this directly

Calls 2

SubtleMustCopyIfIntegralFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected