浏览代码

Fix one more np float32 issue

/develop-newnormalization
Ervin Teng 5 年前
当前提交
9d1eff12
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/components/reward_signals/extrinsic/signal.py

2
ml-agents/mlagents/trainers/components/reward_signals/extrinsic/signal.py


return RewardSignalResult(scaled_reward, unscaled_reward)
def evaluate_batch(self, mini_batch: Dict[str, np.array]) -> RewardSignalResult:
env_rews = np.array(mini_batch["environment_rewards"])
env_rews = np.array(mini_batch["environment_rewards"], dtype=np.float32)
return RewardSignalResult(self.strength * env_rews, env_rews)
正在加载...
取消
保存