mirror of
https://github.com/wassname/ray.git
synced 2026-08-15 12:45:23 +08:00
[RLlib] Issue 8319 DDPG (MA or num_envs_per_worker > 1) broken. (#8324)
This commit is contained in:
@@ -326,6 +326,11 @@ class SquashedGaussian(TFActionDistribution):
|
||||
unsquashed = tf.math.atanh(save_normed_values)
|
||||
return unsquashed
|
||||
|
||||
@staticmethod
|
||||
@override(ActionDistribution)
|
||||
def required_model_output_shape(action_space, model_config):
|
||||
return np.prod(action_space.shape) * 2
|
||||
|
||||
|
||||
class Beta(TFActionDistribution):
|
||||
"""
|
||||
@@ -371,6 +376,11 @@ class Beta(TFActionDistribution):
|
||||
def _unsquash(self, values):
|
||||
return (values - self.low) / (self.high - self.low)
|
||||
|
||||
@staticmethod
|
||||
@override(ActionDistribution)
|
||||
def required_model_output_shape(action_space, model_config):
|
||||
return np.prod(action_space.shape) * 2
|
||||
|
||||
|
||||
class Deterministic(TFActionDistribution):
|
||||
"""Action distribution that returns the input values directly.
|
||||
|
||||
Reference in New Issue
Block a user