mirror of https://github.com/explosion/spaCy.git
Pass vectors name correctly in prune_vectors
This commit is contained in:
parent
3ba5238282
commit
cb6c68a573
|
@ -318,7 +318,7 @@ cdef class Vocab:
|
||||||
keys = xp.asarray([key for (prob, i, key) in priority], dtype="uint64")
|
keys = xp.asarray([key for (prob, i, key) in priority], dtype="uint64")
|
||||||
keep = xp.ascontiguousarray(self.vectors.data[indices[:nr_row]])
|
keep = xp.ascontiguousarray(self.vectors.data[indices[:nr_row]])
|
||||||
toss = xp.ascontiguousarray(self.vectors.data[indices[nr_row:]])
|
toss = xp.ascontiguousarray(self.vectors.data[indices[nr_row:]])
|
||||||
self.vectors = Vectors(data=keep, keys=keys)
|
self.vectors = Vectors(data=keep, keys=keys, name=self.vectors.name)
|
||||||
syn_keys, syn_rows, scores = self.vectors.most_similar(toss, batch_size=batch_size)
|
syn_keys, syn_rows, scores = self.vectors.most_similar(toss, batch_size=batch_size)
|
||||||
remap = {}
|
remap = {}
|
||||||
for i, key in enumerate(keys[nr_row:]):
|
for i, key in enumerate(keys[nr_row:]):
|
||||||
|
|
Loading…
Reference in New Issue