mirror of https://github.com/explosion/spaCy.git
Fix assertion error in staticvectors (#9481)
* Fix assertion error in staticvectors * Update spacy/ml/staticvectors.py * Update spacy/ml/staticvectors.py Co-authored-by: Ines Montani <ines@ines.io> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> Co-authored-by: Ines Montani <ines@ines.io>
This commit is contained in:
parent
74ec37f7a8
commit
a7cb8de0d7
|
@ -101,6 +101,5 @@ def _handle_empty(ops: Ops, nO: int):
|
|||
def _get_drop_mask(ops: Ops, nO: int, rate: Optional[float]) -> Optional[Floats1d]:
|
||||
if rate is not None:
|
||||
mask = ops.get_dropout_mask((nO,), rate)
|
||||
assert isinstance(mask, Floats1d)
|
||||
return mask
|
||||
return mask # type: ignore
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue