Behavioral cloning with PyTorch

In this section, we'll implement something fun, a behavioral cloning example with PyTorch. We'll do this with the help of the CarRacing-v0 OpenAI Gym environment, displayed as follows:

In the CarRacing-v0 environment, the agent is a racing car. A birds-eye view is used the whole time
This example contains multiple Python files. In this section, we'll mention the most important parts. The full source code lives at https://github.com/ivan-vasilev/Python-Deep-Learning-SE/tree/master/ch10/imitation_learning.

The goal is for the red racing car to drive around the track as quickly as it can without sliding out of ...

Get Python Deep Learning - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.