Skip to content

Commit

Permalink
Fixed a missing (though not important) .eval() line
Browse files Browse the repository at this point in the history
  • Loading branch information
Confusezius committed Mar 30, 2022
1 parent b5f85d6 commit 92c2032
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions language_guidance.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ def reembed_in_language(language_model, reassigns_topk, device):
print('Getting language embeddings...')
unique_labs = {key: None for key in np.unique(reassigns_topk)}
reembed_collect = []
_ = language_model.eval()
with torch.no_grad():
language_embeds = language_model(list(unique_labs.keys()), device,
False).cpu()
Expand Down

0 comments on commit 92c2032

Please sign in to comment.