Skip to content

[Embedding] Support immutable EmbeddingVariable in inference mode. #438

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: deeprec2206
Choose a base branch
from

Conversation

lixy9474
Copy link
Collaborator

No description provided.

@@ -127,6 +131,11 @@ class EmbeddingVar : public ResourceBase {
return filter_->GetFreq(key);
}

void Lookup(K key, V* val, V* default_v) {
const V* default_value_ptr = (default_v == nullptr) ? default_value_ : default_v;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码行80

} else {
lookup_fn_ = [](EmbeddingVar<TKey, TValue>* ev, TKey key,
TValue* val, TValue* default_v, int count) {
ev->Lookup(key, val, default_v);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少了count?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants