mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-10 07:04:53 +03:00
Catch a stray reference
This commit is contained in:
parent
8c5df622d8
commit
ff3fed06cf
|
@ -391,6 +391,7 @@ def ant_scorer_forward(
|
||||||
vecshape = vecs.data.shape
|
vecshape = vecs.data.shape
|
||||||
veclens = vecs.lengths
|
veclens = vecs.lengths
|
||||||
scoreshape = mscores.shape
|
scoreshape = mscores.shape
|
||||||
|
idxes = sembeds.indices
|
||||||
|
|
||||||
def backprop(
|
def backprop(
|
||||||
dYs: Tuple[List[Tuple[Floats2d, Ints2d]], Ints2d]
|
dYs: Tuple[List[Tuple[Floats2d, Ints2d]], Ints2d]
|
||||||
|
@ -417,7 +418,7 @@ def ant_scorer_forward(
|
||||||
offset += ll
|
offset += ll
|
||||||
# make it fit back into the linear
|
# make it fit back into the linear
|
||||||
dXscores = xp.expand_dims(dXscores, 1)
|
dXscores = xp.expand_dims(dXscores, 1)
|
||||||
return (dXscores, SpanEmbeddings(sembeds.indices, dXembeds))
|
return (dXscores, SpanEmbeddings(idxes, dXembeds))
|
||||||
|
|
||||||
return (out, sembeds.indices), backprop
|
return (out, sembeds.indices), backprop
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user