mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	Fix labeller loss for unseen labels
This commit is contained in:
		
							parent
							
								
									c9760b2104
								
							
						
					
					
						commit
						a7ee63c0ac
					
				|  | @ -283,7 +283,7 @@ class NeuralLabeller(NeuralTagger): | |||
|         guesses = scores.argmax(axis=1) | ||||
|         for gold in golds: | ||||
|             for tag in gold.labels: | ||||
|                 if tag is None: | ||||
|                 if tag is None or tag not in self.labels: | ||||
|                     correct[idx] = guesses[idx] | ||||
|                 else: | ||||
|                     correct[idx] = self.labels[tag] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user