浏览代码

removing the extra code to set normalize to false if no observation can be normalized

/MLA-1734-demo-provider
vincentpierre 4 年前
当前提交
318622a6
共有 1 个文件被更改,包括 0 次插入9 次删除
  1. 9
      ml-agents/mlagents/trainers/policy/policy.py

9
ml-agents/mlagents/trainers/policy/policy.py


self.previous_action_dict: Dict[str, np.ndarray] = {}
self.memory_dict: Dict[str, np.ndarray] = {}
self.normalize = trainer_settings.network_settings.normalize
if self.normalize:
has_vec_obs = False
# Make sure there is at least one vector observation for normalization
for sen_spec in behavior_spec.sensor_specs:
if len(sen_spec.shape) == 1:
has_vec_obs = True
break
if not has_vec_obs:
self.normalize = False
self.use_recurrent = self.network_settings.memory is not None
self.h_size = self.network_settings.hidden_units
num_layers = self.network_settings.num_layers

正在加载...
取消
保存