Created
May 29, 2020 18:23
-
-
Save sol0invictus/188966912a0752fd3c76b360177b4f4e to your computer and use it in GitHub Desktop.
Actor and Critic Models for DDPG Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Network parameters | |
X_shape = (num_states) | |
QA_shape = (num_states + num_actions) | |
hidden_sizes_1=(1000,500,200) | |
hidden_sizes_2=(400,200) | |
# Main network outputs | |
mu = ANN2(X_shape,list(hidden_sizes_1)+[num_actions], hidden_activation='relu', output_activation='tanh') | |
q_mu = ANN2(QA_shape, list(hidden_sizes_2)+[1], hidden_activation='relu') | |
# Target networks | |
mu_target = ANN2(X_shape,list(hidden_sizes_1)+[num_actions], hidden_activation='relu', output_activation='tanh') | |
q_mu_target = ANN2(QA_shape, list(hidden_sizes_2)+[1], hidden_activation='relu') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment