mirror of
				https://github.com/ml-explore/mlx-examples.git
				synced 2025-10-31 19:18:09 +08:00 
			
		
		
		
	Fix no validation in lora (#1241)
This commit is contained in:
		| @@ -140,8 +140,8 @@ def evaluate( | ||||
|     loss: callable = default_loss, | ||||
|     iterate_batches: callable = iterate_batches, | ||||
| ): | ||||
|     all_losses = 0 | ||||
|     ntokens = 0 | ||||
|     all_losses = mx.array(0.0) | ||||
|     ntokens = mx.array(0) | ||||
|  | ||||
|     index_iterator = iter(range(num_batches)) if num_batches != -1 else iter(int, 1) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Awni Hannun
					Awni Hannun