Skip to content

Commit

Permalink
make EntityLinker robust for nO=None (explosion#7930)
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed May 6, 2021
1 parent 66bfabd commit e9037d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy/ml/models/entity_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@registry.architectures("spacy.EntityLinker.v1")
def build_nel_encoder(tok2vec: Model, nO: Optional[int] = None) -> Model:
with Model.define_operators({">>": chain, "**": clone}):
token_width = tok2vec.get_dim("nO")
token_width = tok2vec.maybe_get_dim("nO")
output_layer = Linear(nO=nO, nI=token_width)
model = (
tok2vec
Expand Down

0 comments on commit e9037d8

Please sign in to comment.