From 08c362d54196ec7668f7254365ab3556d5ea4d2b Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 6 Jul 2018 11:31:22 +0200 Subject: [PATCH] Suppress compiler warning about unreachable code --- spacy/pipeline.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/pipeline.pyx b/spacy/pipeline.pyx index edc793158..d70ae3054 100644 --- a/spacy/pipeline.pyx +++ b/spacy/pipeline.pyx @@ -973,11 +973,11 @@ class TextCategorizer(Pipe): "Add labels before training begins. This functionality was " "available in previous versions, but had significant bugs that " "let to poor performance") - smaller = self.model._layers[-1] - larger = Affine(len(self.labels)+1, smaller.nI) - copy_array(larger.W[:smaller.nO], smaller.W) - copy_array(larger.b[:smaller.nO], smaller.b) - self.model._layers[-1] = larger + #smaller = self.model._layers[-1] + #larger = Affine(len(self.labels)+1, smaller.nI) + #copy_array(larger.W[:smaller.nO], smaller.W) + #copy_array(larger.b[:smaller.nO], smaller.b) + #self.model._layers[-1] = larger self.labels.append(label) return 1