Customise Local Training
This page lists out the files that you can modify your local training config.
Depending on which repository you are using, the file location may be different. This page use Matt's repository as example
Contents
Hyperparameters[edit]
rl_coach/rl_deepracer_coach_robomaker.py
... estimator = RLEstimator( ... hyperparameters={ ... "batch_size": 64, "beta_entropy": 0.01, "discount_factor": 0.999, "e_greedy_value": 0.05, "epsilon_steps": 10000, "exploration_type": "categorical", "loss_type": "mean squared error", "lr": 0.0003, "num_episodes_between_training": 20, "num_epochs": 10, "stack_size": 1, "term_cond_avg_score": 100000.0, "term_cond_max_episodes": 100000, ... }, ... ) ...
Possible Values
Description of each hyperparameter
Items | Values |
---|---|
batch_size | 64 |
stack_size | 1 |
lr | 0.0003 |
exploration_type | categorical |
e_greedy_value | 0.05 |
epsilon_steps | 10000 |
beta_entropy | 0.01 |
discount_factor | 0.999 |
loss_type | Mean squared error or |
num_episodes_between_training | 20 |
term_cond_max_episodes | 100000 |
term_cond_avg_score | 100000 |
Track[edit]
data/minio/bucket/custom_files/training_params.yaml
--- WORLD_NAME: "LGSWide" ...
config.env
--- WORLD_NAME=LGSWide ...
Make sure the values in these 2 files are the same
Where can I find the track name[edit]
All tracks available for training can be found in deepracer-simapp repository
Simply put the filename (without .world
) as value of WORLD_NAME
Action space[edit]
data/minio/bucket/custom_files/model_metadata.json
{ "action_space": [ { "steering_angle": -30, "speed": 0.4, "index": 0 }, { "steering_angle": -30, "speed": 0.8, "index": 1 }, ... ], ... }
Make sure index
is starting from 0 and in the increment of 1
Reward function[edit]
- Save your reward function into
data/minio/bucket/custom_files/reward.py
- Learn more about reward function here: AWS DeepRacer Reward Function Reference
Vehicle mod specifications[edit]
For more detail, please read: Understand Sensors Enabling Racing Types Supported by AWS DeepRacer
data/minio/bucket/custom_files/model_metadata.json
{ "action_space": [ ... ], "sensor": [ "LIDAR", "STEREO_CAMERAS" ], "neural_network": "DEEP_CONVOLUTIONAL_NETWORK_SHALLOW", ... }
sensor[edit]
Option | Value |
---|---|
Single Camera | FRONT_FACING_CAMERA
|
Stereo camera | STEREO_CAMERAS
|
LIDAR sensor | LIDAR
|
Examples[edit]
1. Single camera with a LIDAR sensor
"sensor": [ "LIDAR", "FRONT_FACING_CAMERA" ],
2. Single camera without LIDAR sensor
"sensor": [ "FRONT_FACING_CAMERA" ],
3. Stereo camera with a LIDAR sensor
"sensor": [ "LIDAR", "STEREO_CAMERAS" ],
neural_network[edit]
Option | Value |
---|---|
3 Layer CNN | DEEP_CONVOLUTIONAL_NETWORK_SHALLOW
|
5 Layer CNN | DEEP_CONVOLUTIONAL_NETWORK
|
Race type[edit]
For more detail, please read: Understand Sensors Enabling Racing Types Supported by AWS DeepRacer
data/minio/bucket/custom_files/training_params.yaml
(All values in this file should be enclosed by double quotes regardless of the data type)
--- ... RACE_TYPE: "TIME_TRIAL" ...
Setting race type[edit]
RACE_TYPE
Option | Value |
---|---|
Time trial | TIME_TRIAL
|
Object avoidance | OBJECT_AVOIDANCE
|
Head-to-head racing | HEAD_TO_HEAD_RACING
|
Difference Race Type[edit]
Object avoidance[edit]
For Object avoidance, add these keys manually
Key | Description | Possible values |
---|---|---|
NUMBER_OF_OBSTACLES | Number of objects on a track | int from 1 to 6 |
OBSTACLE_TYPE | Object Type (Only support box now) | BOX
|
RANDOMIZE_OBSTACLE_LOCATIONS | Obstacle location (Fixed or Random) | true (Random) orfalse (Fixed)
|
Head-to-head[edit]
For Head-to-head racing, add these keys manually
Key | Description | Possible values |
---|---|---|
NUMBER_OF_BOT_CARS | Number of bot vehicle(s) | int e.g. 4 |
BOT_CAR_SPEED | Speed for bot vehicles | number e.g. 0.5, 1.6, 4 |
IS_LANE_CHANGE | Enable lane changes for bot vehicle | true or false
|
UPPER_LANE_CHANGE_TIME | Maximum time interval for each bot to randomly change lanes |
int e.g. 5 |
LOWER_LANE_CHANGE_TIME | Minimum time interval for each bot to randomly change lanes |
int e.g. 1 |
RANDOMIZE_BOT_CAR_LOCATIONS | Use random locations for bot cars | true or false
|