mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 23:47:31 +03:00 
			
		
		
		
	Randomize pipeline order during training
This commit is contained in:
		
							parent
							
								
									a1d4c97fb7
								
							
						
					
					
						commit
						b082f76494
					
				|  | @ -215,7 +215,9 @@ class Language(object): | |||
|         grads = {} | ||||
|         def get_grads(W, dW, key=None): | ||||
|             grads[key] = (W, dW) | ||||
|         for proc in self.pipeline[1:]: | ||||
|         pipes = list(self.pipeline[1:]) | ||||
|         random.shuffle(pipes) | ||||
|         for proc in pipes: | ||||
|             if not hasattr(proc, 'update'): | ||||
|                 continue | ||||
|             tokvecses, bp_tokvecses = tok2vec.model.begin_update(feats, drop=drop) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user