浏览代码

multiple sizes configs

/develop/bisim-review
yanchaosun 4 年前
当前提交
d7402406
共有 8 个文件被更改,包括 191 次插入0 次删除
  1. 4
      ml-agents/mlagents/trainers/ppo_transfer/optimizer.py
  2. 1
      ml-agents/mlagents/trainers/settings.py
  3. 32
      config/ppo_transfer/CrawlerStatic128.yaml
  4. 32
      config/ppo_transfer/CrawlerStatic128_256.yaml
  5. 32
      config/ppo_transfer/CrawlerStatic256.yaml
  6. 26
      config/ppo_transfer/CrawlerStatic256ppo.yaml
  7. 32
      config/ppo_transfer/CrawlerStatic32_256.yaml
  8. 32
      config/ppo_transfer/CrawlerStatic64_256.yaml

4
ml-agents/mlagents/trainers/ppo_transfer/optimizer.py


train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES)
elif self.train_type == "encoding":
train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "encoding")
elif self.train_type == "policy":
train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "encoding")
train_vars += tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "policy")
train_vars += tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "value")
print("trainable", train_vars)
# train_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "encoding")
# train_vars += tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "policy")

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


separate_value_train: bool = False
separate_policy_train: bool = False
seprate_value_net: bool = False
use_var_encoder: bool = False
use_var_predict: bool = False
with_prior: bool = False

32
config/ppo_transfer/CrawlerStatic128.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 128
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 512
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true

32
config/ppo_transfer/CrawlerStatic128_256.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 128
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 256
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true

32
config/ppo_transfer/CrawlerStatic256.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 256
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 512
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true

26
config/ppo_transfer/CrawlerStatic256ppo.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
network_settings:
normalize: true
hidden_units: 256
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true

32
config/ppo_transfer/CrawlerStatic32_256.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 32
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 256
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true

32
config/ppo_transfer/CrawlerStatic64_256.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 64
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 256
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true
正在加载...
取消
保存