1. Learn
  2. /
  3. Courses
  4. /
  5. Deep Reinforcement Learning in Python

Connected

Exercise

The Q-Network architecture

You are almost ready to train your first Deep Reinforcement Learning agent! Before you can go ahead with your first complete training loop, you need a neural network architecture to drive the agent's decisions and its ability to learn.

You will modify the generic architecture you defined in an earlier exercise. torch and torch.nn are imported into your exercises.

Instructions

100 XP
  • Instantiate the first hidden layer; its input will be the environment state, with dimension state_size.
  • Instantiate the output layer; it provides the Q-values for each action, with dimension action_size.
  • Complete the forward() method; use the torch.relu activation function for this example.