We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think below code maybe has problem:
PyTorch-DDPG-Stock-Trading/DDPG.py
Lines 85 to 90 in 0c5c2f9
The two gradients need to be calculated separately, because their loss functions are different. I think it should be changed to below:
`
#for critic self.critic_network.train(y_batch, action_batch, state_batch) #for actor actor_loss =-self.critic_network.critic(self.actor_network.actor_action(state_batch), state_batch).mean() self.actor_network.optimizer.zero_grad() actor_loss.backward() self.actor_network.optimizer.step()
` thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think below code maybe has problem:
PyTorch-DDPG-Stock-Trading/DDPG.py
Lines 85 to 90 in 0c5c2f9
The two gradients need to be calculated separately, because their loss functions are different.
I think it should be changed to below:
`
`
thanks!
The text was updated successfully, but these errors were encountered: