I tried to upgrade a model training script from a 1.4.0 pytorch environment, in which it is working, to a 1.6.0-nightly pytorch environment, in which it is not.
The fact there are no code changes leads me to believe that there’s some broken behavior in 1.6.0-nightly, which is why I’ve filed this issue as a bug report:

  
      github.com/pytorch/pytorch
  
  
    
  
	  
  

  
    
      Model training script emits RuntimeError when upgraded from 1.4.0 to 1.6-nightly 1
    

    
      
        opened 
        
          
        
        May 27, 2020
      
      


      
        
          
          ResidentMario
        
      
    
  



  🐛 Bug
I have a relatively straightforward feed-forward model training script written in and verified working using pytorch 1.4.0. I upgraded my...





  
  
    
    
  
  


Maybe I’m wrong though? In case I am, would love for someone here to double check my layers. I’m getting a RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation and but I’m pretty sure that none of my operations are in-place? Would love to get a second pair of eyes on this. 
Here’s a gist with the model training code: https://gist.github.com/ResidentMario/d3767d5f3944ca95218f83e5ec0f5b44 2.