Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2Gluon
Commits
32cef6a4
Commit
32cef6a4
authored
Jun 25, 2019
by
Nicola Gatto
Browse files
Use mean when calculating actor loss
parent
5d9ba4fa
Pipeline
#153276
failed with stages
in 2 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/templates/gluon/reinforcement/agent/Agent.ftl
View file @
32cef6a4
...
...
@@ -548,7 +548,7 @@ class DdpgAgent(Agent):
actor_qvalues = tmp_critic(states, self._actor(states))
# For maximizing qvalues we have to multiply with -1
# as we use a minimizer
actor_loss = -1
*
actor_qvalues
actor_loss = -1
*
actor_qvalues
.mean()
actor_loss.backward()
trainer_actor.step(self._minibatch_size)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment