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

Connected

Exercise

Building a U-Net: forward method

With the encoder and decoder layers defied, you can now implement the forward() method of the U-net. The inputs have already been passed through the encoder for you. However, you need to define the last decoder block.

The goal of the decoder is to upsample the feature maps so that its output is of the same height and width as the U-Net's input image. This will allow you to obtain pixel-level semantic masks.

Instructions

100 XP
  • Define the last decoder block, using torch.cat() to form the skip connection.