mirror of https://github.com/explosion/spaCy.git
Suppress compiler warning about unreachable code
This commit is contained in:
parent
8ae1bec8bf
commit
08c362d541
|
@ -973,11 +973,11 @@ class TextCategorizer(Pipe):
|
||||||
"Add labels before training begins. This functionality was "
|
"Add labels before training begins. This functionality was "
|
||||||
"available in previous versions, but had significant bugs that "
|
"available in previous versions, but had significant bugs that "
|
||||||
"let to poor performance")
|
"let to poor performance")
|
||||||
smaller = self.model._layers[-1]
|
#smaller = self.model._layers[-1]
|
||||||
larger = Affine(len(self.labels)+1, smaller.nI)
|
#larger = Affine(len(self.labels)+1, smaller.nI)
|
||||||
copy_array(larger.W[:smaller.nO], smaller.W)
|
#copy_array(larger.W[:smaller.nO], smaller.W)
|
||||||
copy_array(larger.b[:smaller.nO], smaller.b)
|
#copy_array(larger.b[:smaller.nO], smaller.b)
|
||||||
self.model._layers[-1] = larger
|
#self.model._layers[-1] = larger
|
||||||
self.labels.append(label)
|
self.labels.append(label)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue