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

Method MemoryUsed

tensorflow/core/kernels/lookup_table_op.h:263–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 }
262
263 int64 MemoryUsed() const override {
264 if (table_) {
265 const int64 num_elements = table_->size();
266 return num_elements * (sizeof(K) + sizeof(V));
267 } else {
268 return 0;
269 }
270 }
271
272 private:
273 std::unique_ptr<std::unordered_map<K, V>> table_;

Callers 1

ComputeMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected