Hi,
I am studying RL with reinforcement/reinforce.py in pytorch/examples. I have some questions about it.


What does action.reinforce® 678 internally do ?


Below is REINFORCE update rule where v_t is a return. We need to do gradient “ascent” as below but if we use optimizer.step 39, it is gradient “descent”. Is [action.reinforce®]((https://github.com/pytorch/examples/blob/master/reinforcement_learning/reinforce.py 189) multiplying log probability by -r? Then, it makes sense.



In autograd.backward(model.saved_actions, [None for _ in model.saved_actions]) 85, what is the role of None here?


Thanks.