mirror of
				https://github.com/pytorch/pytorch.git
				synced 2025-11-04 08:00:58 +08:00 
			
		
		
		
	sparse tensor operations (#735)
This commit is contained in:
		
				
					committed by
					
						
						Adam Paszke
					
				
			
			
				
	
			
			
			
						parent
						
							c93c884ee2
						
					
				
				
					commit
					f17cfe4293
				
			@ -132,7 +132,8 @@ class Optimizer(object):
 | 
			
		||||
        """Clears the gradients of all optimized :class:`Variable` s."""
 | 
			
		||||
        for group in self.param_groups:
 | 
			
		||||
            for param in group['params']:
 | 
			
		||||
                param.grad.data.zero_()
 | 
			
		||||
                if param.grad is not None:
 | 
			
		||||
                    param.grad.data.zero_()
 | 
			
		||||
 | 
			
		||||
    def step(self, closure):
 | 
			
		||||
        """Performs a single optimization step (parameter update).
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user