Getting Started with AWS Deepracer (2020 edition)

Vaibhav Malpani
Vaibhav Malpani’s Blog
5 min readJan 27, 2020

Since the last time, I wrote a blog on how to win at Deepracer? a LOT has changed on the Deepracer Console. You could read that to know the very basics of Deepracer and Reinforcement Learning. This blog will guide you to build your model on the new Deepracer Console. This can help you get ready for the Deepracer leagues at your nearest summits (for more details) and also for Virtual circuits that take place throughout the year.

AWS Deepracer Evo, 2020.

This blog is divided into 3 parts:

  1. Steps on how to build the model for Deepracer
  2. Pricing for Deepracer
  3. Key Takeaways

Steps to build your Deepracer Model:

  1. Setup account resources
  2. Build your vehicle in Garage
  3. Create a Model
  4. Evaluate your Model

1. Setup account resources:

  • Navigate here to get started
  • Look of Step 0: Create account resources
  • Just click on Create Resource there.

2. Build your vehicle in Garage:

Before you hop on to start building your model, it’s good to configure your vehicle in your garage.

  • Navigate to garage here
  • Click Build New Vehicle at the top right corner
  • The first thing you see here is to set up an extra camera or sensor if you have one, else stick to the just front camera. This also gives you option to add the LIDAR sensor for object detection and avoid it.
Mod specification
  • Next, you could see Neural Network Topologies, which now lets you select the CNN layer depending upon the task you want to do out of your Deepracer.
  • 3 Layer CNN: A shallower network of fewer layers trains much faster than a deeper network of more layers. It is ideal for training models that are built with less complex tasks to master.
  • 5 Layer CNN: A deeper neural network, with more layers, will take longer to train but will be able to handle more complex tasks.
  • Next is setting up Action Space,
  • Maximum steering angle: This is the maximum angle you want the Deepracer to turn.
  • Steering angle granularity: This is how fine you want to divide the steering angle. In the above case, the Steering angle is divided as (-30, -15, 0, 15, 30)
  • Maximum Speed: This is the maximum speed you want your Deepracer to go at any given angle.
  • Speed Granularity: This is how fine you want to divide your Max speed.
  • On the basis of all the above-mentioned values, the below-shown table is formed. Which gives your Deepracer, choices to choose from while performing an action.
  • Another new addition in Deepracer 2020, was giving developers to change the Visual appearance of your Deepracer.
  • Just click Done at the end and you have built your Customized Deepracer Car, Parked in your Garage :)

3. Create a Model:

  • To start with creating model, Navigate here
  • Enter a model name
  • Select a track on which you wish to train your Deepracer
  • Select Next
  • Choose the race type here and the car to be used from your Garage
  • Next, You have to give a reward function. Refer THIS to get started with writing your Reward Function.

What is a reward function? — It is you giving points for good action taken by the Deepracer and reducing points for taking an incorrect action.

  • Give your hyperparameters. (If this is your first model, don’t worry about this, just let this be set to defaults). Click here for more details on Hyperparameters.
  • Select your stop condition, meaning asking the Deepracer console to train the Deepracer for a given amount of time. Train for at least 250 minutes to get a decent running model.

4. Evaluate the Model:

  • Navigate here to look at a list of all models.
  • Click on your model name
  • There you could see your Training Progress.
  • Below this, you could see Start new evaluation.
  • On clicking this, Select the track on which you want to test your model. (Yes, you can evaluate on a different track than the one you have trained it on)
  • Choose the number of trials to evaluate your model. It’s good to choose 5 trails. ;)
  • Choose the Race Type that you want to evaluate.
  • Click on Start evaluation.

Pricing:

  • AWS DeepRacer provides a Free Tier, that covers the first 7 hours of training.
  • After this, it cost around 4 to 5 dollars an hour to train and evaluate your model. checkout here for more information about the pricing.

Key Takeaways:

  1. You should be careful while choosing the training time of your model. If you train it too much it will overfit the track and won’t be able to perform with slight changes in the environment, whereas on the other hand if your train it less, the model won’t be strong enough to make correct decisions.
  2. Your primary focus while building and training the model on the virtual environment should be on the accuracy and reliability of your model and not the speed or lap time of your DeepRacer. As in the Physical racing league, you will be able to accelerate your DeepRacer using their app on the phone.

Best of luck for 2020. I hope you win and get a chance to participate in the Grand Deepracer League at re:Invent 2020.

If you liked this post, please clap for it; follow me if you want more such posts!

--

--

Vaibhav Malpani
Vaibhav Malpani’s Blog

Google Developer Expert for Google Cloud. Python Developer. Cloud Evangelist.