Skip to content

Commit b9a87a5

Browse files
authored
Update agent.py (#8722)
Update agent.py according to changes noted #7719
1 parent ff5bd71 commit b9a87a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

research/efficient-hrl/agent.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def log_probs(self, states, actions, state_reprs, contexts=None):
149149

150150
error = tf.square(actions - pred_actions)
151151
spec_range = (self._action_spec.maximum - self._action_spec.minimum) / 2
152-
normalized_error = error / tf.constant(spec_range) ** 2
152+
normalized_error = tf.cast(error, tf.float64) / tf.constant(spec_range) ** 2
153153
return -normalized_error
154154

155155
@gin.configurable('uvf_add_noise_fn')

0 commit comments

Comments
 (0)