Check out this post:

  
      github.com/spro/practical-pytorch
  
  
    



Issue: weights update for "char-rnn-classification" 18


	
	opened by WeiFoo
	on 2017-05-19
	
	
	closed by spro
	on 2017-05-20
	


In the "char-ran-classification" tutorial, the weights are updated by the following code.
 for p in rnn.parameters():
 p.data.add_(-learning_rate, p.grad.data)
I was trying to...




  
  
    
    
  
  


Essentially, using the optimizer will redefine the RNN when it is called inside the training loop and then update the wrong network weights