mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Fix minibatching
This commit is contained in:
		
							parent
							
								
									ded0df5e2f
								
							
						
					
					
						commit
						9bae0ddc50
					
				|  | @ -148,7 +148,7 @@ def minibatch(items, size=8): | |||
|     ''' | ||||
|     items = iter(items) | ||||
|     while True: | ||||
|         batch_size = next(size) if hasattr(size, '__next__') else size | ||||
|         batch_size = next(size) #if hasattr(size, '__next__') else size | ||||
|         batch = list(cytoolz.take(int(batch_size), items)) | ||||
|         if len(batch) == 0: | ||||
|             break | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user