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

Connected

Exercise

Actor Critic loss calculations

As a final step before you can train your agent with A2C, write a calculate_losses() function which returns the losses for both networks.

For reference, these are the expressions for the actor and critic loss functions respectively:

Instructions

100 XP
  • Calculate the TD target.
  • Calculate the loss for the Actor network.
  • Calculate the loss for the Critic network.