Skip to content

Remove batch encoder#34

Open
jteijema wants to merge 1 commit into
asreview:masterfrom
jteijema:remove-batch-encoder
Open

Remove batch encoder#34
jteijema wants to merge 1 commit into
asreview:masterfrom
jteijema:remove-batch-encoder

Conversation

@jteijema

Copy link
Copy Markdown
Member

This PR removes the batch encoder. While the performance was better, it removed the ability of variable length abstracts. Retained is the removal of storing embeddings to the result dataframe.

@jteijema
jteijema requested a review from J535D165 November 22, 2021 17:07
for x in tqdm(encoded.input_ids):
embeddings.append(model(x.unsqueeze(0), output_hidden_states=False)[-1].detach().numpy().squeeze()) # noqa: E501
for x in tqdm(encoded):
embeddings.append(model(**x, output_hidden_states=False)[-1].detach().numpy().squeeze()) # noqa: E501

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not a big fan of the noqa.

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