mirror of
https://github.com/wassname/ray.git
synced 2026-07-21 12:50:45 +08:00
* revamp saving * smaller jpgs * hide verbose * Tue Dec 19 22:25:01 PST 2017 * make sure temp dirs sort lexiographically * save total reward too * zero pad i * 160x160 dqn * ever higher res dqn
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
from __future__ import absolute_import
|
|
from __future__ import division
|
|
from __future__ import print_function
|
|
|
|
from ray.tune import register_env, run_experiments
|
|
|
|
from env import CarlaEnv, ENV_CONFIG
|
|
|
|
env_name = "carla_env"
|
|
env_config = ENV_CONFIG.copy()
|
|
env_config.update({
|
|
"verbose": False,
|
|
"x_res": 240,
|
|
"y_res": 240,
|
|
"use_depth_camera": False,
|
|
"discrete_actions": True,
|
|
"max_steps": 200,
|
|
"weather": [1, 3, 7, 8, 14],
|
|
})
|
|
register_env(env_name, lambda: CarlaEnv(env_config))
|
|
|
|
run_experiments({
|
|
"carla": {
|
|
"run": "DQN",
|
|
"env": "carla_env",
|
|
"resources": {"cpu": 4, "gpu": 1},
|
|
"config": {
|
|
"model": {
|
|
"conv_filters": [
|
|
[16, [8, 8], 4],
|
|
[32, [5, 5], 3],
|
|
[32, [5, 5], 2],
|
|
[512, [10, 10], 1],
|
|
],
|
|
},
|
|
"timesteps_per_iteration": 100,
|
|
"learning_starts": 1000,
|
|
"schedule_max_timesteps": 100000,
|
|
"gamma": 0.95,
|
|
"tf_session_args": {
|
|
"gpu_options": {"allow_growth": True},
|
|
},
|
|
},
|
|
},
|
|
})
|