1. Learn
  2. /
  3. Courses
  4. /
  5. Deep Learning for Images with PyTorch

Connected

Exercise

Box regressor block

Your final task is to create a regressor block to predict bounding box coordinates. You decide to have a block with 2 fully connected layers with a ReLU activation in between, similar to the classifier you defined earlier.

Your vgg_model and input_dim are still available and torch and torchvision.models have been imported.

Instructions

100 XP
  • Create a variable num_coordinates with the number of boundary box coordinates to predict.
  • Define the appropriate input dimension for the first linear layer and set the output dimension to 32.
  • Define the appropriate output dimension in the regressor's last layer.