Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Return embeddings from model #21

Merged
merged 2 commits into from
Jan 17, 2022
Merged

Return embeddings from model #21

merged 2 commits into from
Jan 17, 2022

Conversation

kvetab
Copy link
Contributor

@kvetab kvetab commented Jan 16, 2022

No description provided.

@@ -73,7 +73,7 @@ def predict_proba(self, seq, remove_special=True, return_all_hiddens=False):
pred = pd.DataFrame(pred.numpy(), columns=self.interface.task.target_dictionary.symbols)
if remove_special:
pred.drop(['<s>', '<pad>', '</s>', '<unk>', '<mask>'], axis=1, inplace=True)
return pred
return pred, extra
Copy link
Collaborator

Choose a reason for hiding this comment

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

please return extra only if return_all_hiddens is True

@prihoda
Copy link
Collaborator

prihoda commented Jan 17, 2022

Fixes #20

@prihoda prihoda merged commit d250781 into Merck:main Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants