mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	Fix GPU training for textcat. Closes #3473
This commit is contained in:
		
							parent
							
								
									85dcd9477e
								
							
						
					
					
						commit
						f77bf2bdb1
					
				|  | @ -614,9 +614,9 @@ def build_bow_text_classifier(nr_class, ngram_size=1, exclusive_classes=False, | |||
|         no_output_layer=False, **cfg): | ||||
|     with Model.define_operators({">>": chain}): | ||||
|         model = ( | ||||
|             with_cpu(Model.ops, | ||||
|                 extract_ngrams(ngram_size, attr=ORTH)  | ||||
|             >> with_cpu(Model.ops, | ||||
|                 LinearModel(nr_class) | ||||
|                 >> LinearModel(nr_class) | ||||
|             ) | ||||
|         ) | ||||
|         if not no_output_layer: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user