I’ve been reading through “Hands-On Machine Learning with Scikit-Learn & Tensorflow” and implementing the algorithms presented in the book using PyTorch instead of Tensorflow. (I’m a beginner and my PhD friends have recommended Pytorch to me!)
I have been working on this algorithm (link 23, go to “Policy Gradients”), but my implementation in Pytorch is simply not learning at all. Here’s the code 22. Could anyone point out to me what I’m doing wrong? My hunch is that I’m missing logarithms somewhere, but not too sure.