浏览代码

slightly nicer output

/sensitivity
Andrew Cohen 5 年前
当前提交
c1f91b5a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/ppo/optimizer.py

2
ml-agents/mlagents/trainers/ppo/optimizer.py


feed_dict = self._construct_feed_dict(batch, num_sequences)
sens = self._execute_model(feed_dict, {"sensi": self.sensitivity})["sensi"][0]
for obs, grad in sorted(enumerate(sens), reverse=True, key=lambda x: x[1]):
print(obs, grad)
print("Observation {} has relevance {}".format(obs, grad))
def _construct_feed_dict(
self, mini_batch: AgentBuffer, num_sequences: int

正在加载...
取消
保存