Related to this issue.

  
      github.com/pytorch/pytorch
  
  
    
  
	  
  

  
    
      Unbound local variable in LR scheduler 83
    

    
      
        opened 
        
          
        
        Jan 27, 2020
      
      

        
          closed 
        
          
        
        Feb 11, 2020
      
        

      
        
          
          vadimkantorov
        
      
    
  



  This is about a mysterious error. I have the following code that runs ok:
import torch
class MultiStepLR(torch.optim.lr_scheduler._LRScheduler):
 def __init__(self, optimizer, gamma, milestones,...



    module: optimizer
    triaged


  
  
    
    
  
  


If get_lr() throws an error, pytorch suppresses it but will later encounter this “values” unbounded bug. Fix the get_lr() error and this bug will go away.