Hi
I want to implement the following algorithm, taken from this book, section 13.6

Untitled.png954×588 58.5 KB

Pytorch requires me to compute a loss for w and for theta.
I am struggling on coming up with that loss term, because it requires to add some factor that depends on the current weights to the derivative - something I don’t really know how to do.
I would appreciate some small code snippet to see how something like this is done with pytorch.
This same question on stackoverflow, with clearer formulas

  
      datascience.stackexchange.com
  
  
      
    
  

  Pytorch: How to create an update rule the doesn't come from derivatives? 6



  machine-learning, python, reinforcement-learning, backpropagation



  asked by
  
  
    Gulzar
  
  on 01:07PM - 17 Feb 19 UTC