mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-29 09:23:12 +03:00
fix NEL overfitting test for GPU (#5236)
This commit is contained in:
parent
311133e579
commit
ab59f3124e
|
@ -1456,7 +1456,7 @@ class EntityLinker(Pipe):
|
||||||
scores = prior_probs + sims - (prior_probs*sims)
|
scores = prior_probs + sims - (prior_probs*sims)
|
||||||
|
|
||||||
# TODO: thresholding
|
# TODO: thresholding
|
||||||
best_index = scores.argmax()
|
best_index = scores.argmax().item()
|
||||||
best_candidate = candidates[best_index]
|
best_candidate = candidates[best_index]
|
||||||
final_kb_ids.append(best_candidate.entity_)
|
final_kb_ids.append(best_candidate.entity_)
|
||||||
final_tensors.append(sentence_encoding)
|
final_tensors.append(sentence_encoding)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user