Maybe helpful. I had a similar problem.

  
      github.com/pytorch/pytorch
  
  
    
  
	  
  

  
    
      Stochasticity after reshaping operations 29
    

    
      
        opened 
        
          
        
        Apr 20, 2017
      
      

        
          closed 
        
          
        
        Feb 20, 2018
      
        

      
        
          
          khanhptnk
        
      
    
  



  I would love to see PyTorch maintaining Stochasticity of the output after reshaping. Right now, if you concat or just .view(-1)...