浏览代码

add default settings

/develop/add-fire/bc
Andrew Cohen 5 年前
当前提交
d5592462
共有 2 个文件被更改,包括 4 次插入8 次删除
  1. 6
      ml-agents/mlagents/trainers/components/bc/module_torch.py
  2. 6
      ml-agents/mlagents/trainers/settings.py

6
ml-agents/mlagents/trainers/components/bc/module_torch.py


settings.demo_path, policy.sequence_length, policy.behavior_spec
)
self.batch_size = (
settings.batch_size if settings.batch_size else default_batch_size
)
self.num_epoch = settings.num_epoch if settings.num_epoch else default_num_epoch
self.batch_size = settings.batch_size
self.num_epoch = settings.num_epoch
self.n_sequences = max(
min(self.batch_size, self.demonstration_buffer.num_experiences)
// policy.sequence_length,

6
ml-agents/mlagents/trainers/settings.py


steps: int = 0
strength: float = 1.0
samples_per_update: int = 0
# Setting either of these to None will allow the Optimizer
# to decide these parameters, based on Trainer hyperparams
num_epoch: Optional[int] = None
batch_size: Optional[int] = None
num_epoch: int = 3
batch_size: int = 64
@attr.s(auto_attribs=True)

正在加载...
取消
保存