浏览代码

Pad buffer at the end

/develop/lstm-burnin
Ervin Teng 4 年前
当前提交
d027de7f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/buffer.py

2
ml-agents/mlagents/trainers/buffer.py


else:
# We want to duplicate the last value in the array, multiplied by the padding_value.
padding = np.array(self[-1], dtype=np.float32) * self.padding_value
return [padding] * (training_length - leftover) + self[:]
return self[:] + [padding] * (training_length - leftover)
else:
return self[len(self) - batch_size * training_length :]

正在加载...
取消
保存