For people looking around, this is the change @hughperkins is referring to:

  
      github.com/pytorch/pytorch
  
  
      
    
  


  Replace StochasticFunctions v2



  by colesbury
  on 08:30PM - 18 Oct 17



  3 commits
  changed 9 files
  with 292 additions
  and 191 deletions.


  
  
    
    
  
  


And the doc on master branch reflects that: http://pytorch.org/docs/master/distributions.html 9
I definitely agree that this is a lot easier to understand as it is close to what’s described in the REINFORCE paper. Since the pytorch binary is still on 0.2.0 and doesn’t include this change, I guess we have to install pytorch from source for now.