浏览代码

[skip ci] replace buffer length by buffer size

/distributed-training
Anupam Bhatnagar 5 年前
当前提交
7ae32cc2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ml-agents/mlagents/trainers/ppo/trainer.py

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


for _ in range(num_epoch):
self.update_buffer.shuffle(sequence_length=self.policy.sequence_length)
buffer = self.update_buffer
max_num_batch = buffer_length // batch_size
max_num_batch = self.trainer_parameters["buffer_size"] // batch_size
for l in range(0, max_num_batch * batch_size, batch_size):
update_stats = self.optimizer.update(
buffer.make_mini_batch(l, l + batch_size), n_sequences

正在加载...
取消
保存