AWS DeepRacer - Advanced Model Training Using AWS DeepRacer Console

The guide walks you through how to optimize your model  by using an advanced version of the reward  function and fine-tuning your model’s hyperparameters.

Model tuning with the advanced reward function

In previous, I created your first trained model  using the default settings in console.  

https://www.truongbui.com/2020/12/model-training-using-the-aws-deepracer-console.html

To set up your next model,  follow these steps.

1.    In your AWS account, go to the AWS Management Console.

2.    Choose  us-east-1 region at the top right corner of the Regions dropdown menu.

3.    From the top left of the console,  click Services, type DeepRacer in the search  box, and select AWS DeepRacer.  That will open  the AWS DeepRacer  console.

4.    From the AWS DeepRacer  console,  click Reinforcement Learning.

5.    Select the model  you built in previous (Roadstour Model).

6.    From the Action dropdown, select Clone.

7.    Name the model  and add a description.

8.    In the  Environment simulation section, select the same  track used  in your first model.

9.    Under Action space,  familiarize yourself with these settings and accept the defaults.

10.  In the Reward function section, select the Advanced function dropdown arrow and then select the  first Insert code button. This code block optimizes for turning and requires less time to train. You can also scroll down  a little to select the second Insert code  button. The code for this function focuses on optimizing for speed. It also requires less training time.

11.  In the  Algorithm settings section, accept the default settings.

12.  For Stop  conditions, choose a max time of 60 minutes and click Start training.  The new training will initiate in 5 to 6 minutes. You then must  wait for the training job to complete before proceeding. If you choose a max time of 60 minutes, it will take up to 60 minutes for this training job to complete. It is complete when  the status reads  Ready.

Tip: One effective way to train your model  is to use shorter training session followed  by adjustments and then more  training. You may want to compare this type of approach to longer training jobs exceeding several hours.

13.  Now, select the name of the model  you just trained.

14.  Click Start new  evaluation.

15.  Select the track (this should  be the same  as the  track you trained on).

16.  Set the number of trials to 3 and click Start evaluation. The evaluation results will update in approximately 5 minutes.

Note: While the evaluation job is running, watch the live results in the simulator. What’s your car doing that seems to be working well? Is it staying on the center line? Is it moving at a good  speed? What’s your car doing that isn’t working well? How’s it doing around corners, for instance?

Tips and tricks

•    Try to increase your speed setting and stabilize the training.

•    Use progress and speed variables to reward  higher speeds and faster lap times.

•    Keep as close to the center line as possible.

Additional Resources

•  For more  information about AWS DeepRacer, see https://aws.amazon.com/deepracer/.

• To troubleshoot and collaborate about the AWS DeepRacer, see https://forums.aws.amazon.com/forum.jspa?forumID=318.

AWS DeepRacer


Comments

Let's connect. A great way to get my attention is to comment on one of my posts.

Get In Touch

Send