REINFORCE (Vanilla Policy Gradient VPG) Algorithm Explained | Deep Reinforcement Learning
Ғылым және технология
Whiteboard walkthru and explanation of the REINFORCE Policy Gradient Deep Reinforcement Learning algorithm.
Want more videos like this? Support me here: www.buymeacoffee.com/johnnycode
Пікірлер: 7
Let me know if you want the code walkthru and demo.
@peterhpchen
28 күн бұрын
Where is the code?
@johnnycode
27 күн бұрын
@@peterhpchen Here you go github.com/johnnycode8/gym_solutions/blob/main/cliff_walking_reinforce.py
Thanks for the good work. I am still practicing the FrozenLake DQL+CNN and wonder how to train the model on CUDA as the training time keeps increasing.
@johnnycode
2 ай бұрын
Thank you for the continual support, Andy! Here are some general guidelines on using CUDA: # First, make sure you have CUDA installed properly and is supported by your GPU device = 'cuda' if torch.cuda.is_available() else 'cpu' print(device) # Then, anywhere that uses the network should be sent to CUDA, for example: DQN(....).to(device) # Also, anywhere that deals with Tensors should be sent to CUDA, for example: torch.FloatTensor(...).to(device) torch.IntTensor(...).to(device) Note that when you run your code and Pytorch complains that not everything is on the same device, it means you didn't send something to CUDA using "to(device)".
@kimiochang
2 ай бұрын
@@johnnycode thanks a lot for the help. And It works!
@johnnycode
2 ай бұрын
@@kimiochangThat’s great 👍