diff --git a/rl_games/common/a2c_common.py b/rl_games/common/a2c_common.py index e083b0b5..54a5cda1 100644 --- a/rl_games/common/a2c_common.py +++ b/rl_games/common/a2c_common.py @@ -240,13 +240,10 @@ def __init__(self, base_name, params): self.batch_size = self.horizon_length * self.num_actors * self.num_agents self.batch_size_envs = self.horizon_length * self.num_actors - assert(('minibatch_size_per_env' in self.config) or ('minibatch_size' in self.config)) - self.minibatch_size_per_env = self.config.get('minibatch_size_per_env', 0) - self.minibatch_size = self.config.get('minibatch_size', self.num_actors * self.minibatch_size_per_env) - # either minibatch_size_per_env or minibatch_size should be present in a config # if both are present, minibatch_size is used # otherwise minibatch_size_per_env is used minibatch_size_per_env is used to calculate minibatch_size + assert(('minibatch_size_per_env' in self.config) or ('minibatch_size' in self.config)) self.minibatch_size_per_env = self.config.get('minibatch_size_per_env', 0) self.minibatch_size = self.config.get('minibatch_size', self.num_actors * self.minibatch_size_per_env)