Skip to content
New issue

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

Add DDPG #1

Open
wants to merge 5 commits into
base: vector-env
Choose a base branch
from
Open

Add DDPG #1

wants to merge 5 commits into from

Conversation

kevslinger
Copy link
Collaborator

No description provided.

@brett-daley brett-daley self-requested a review March 28, 2022 19:29
Copy link
Owner

@brett-daley brett-daley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but needs implementation changes that we discussed.

with tf.GradientTape() as tape:
Q = self.predict_values(states, actions, network='main')
# TODO: Should we use huber loss here?
loss = tf.reduce_mean(huber_loss(targets - Q))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use tf.square instead

fast_dqn/deep_deterministic_policy_gradient.py Outdated Show resolved Hide resolved
Dense(1)
])
# We make one shared encoder for the actor and critic.
# TODO: Should we make separate main/target/exec encoders?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should have target/exec models for the encoder, too.

self.num_actions = self._vec_env.action_space.shape[-1]
self.action_limit = self._vec_env.action_space.high.max()

actor_optimizer = Adam(lr=1e-4)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have a single optimizer for actor + critic. Use Adam with lr=1e-4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants