From 26c34ab8b00466ec9b3daa8e9194bad068ee9e1c Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 18 Jan 2021 20:43:15 +0100 Subject: [PATCH] Fix parser resizing for cupy (#6758) --- spacy/ml/models/parser.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacy/ml/models/parser.py b/spacy/ml/models/parser.py index 7ce0165a2..da53f562e 100644 --- a/spacy/ml/models/parser.py +++ b/spacy/ml/models/parser.py @@ -185,8 +185,7 @@ def _resize_lower(model, new_nO): nI = smaller.maybe_get_dim("nI") nF = smaller.maybe_get_dim("nF") nP = smaller.maybe_get_dim("nP") - with use_ops("numpy"): - larger = _define_lower(nO=new_nO, nI=nI, nF=nF, nP=nP) + larger = _define_lower(nO=new_nO, nI=nI, nF=nF, nP=nP) # it could be that the model is not initialized yet, then skip this bit if smaller.has_param("W"): larger_W = larger.ops.alloc4f(nF, new_nO, nP, nI)