浏览代码

Remove previous action from policy

/develop/nopreviousactions
Ervin Teng 5 年前
当前提交
a73704bc
共有 1 个文件被更改,包括 1 次插入13 次删除
  1. 14
      ml-agents/mlagents/trainers/common/nn_policy.py

14
ml-agents/mlagents/trainers/common/nn_policy.py


self.prev_action = tf.placeholder(
shape=[None, len(self.act_size)], dtype=tf.int32, name="prev_action"
)
prev_action_oh = tf.concat(
[
tf.one_hot(self.prev_action[:, i], self.act_size[i])
for i in range(len(self.act_size))
],
axis=1,
)
hidden_policy = tf.concat([encoded, prev_action_oh], axis=1)
hidden_policy,
self.memory_in,
self.sequence_length_ph,
name="lstm_policy",
encoded, self.memory_in, self.sequence_length_ph, name="lstm_policy"
)
self.memory_out = tf.identity(memory_policy_out, "recurrent_out")

正在加载...
取消
保存