
        Figure 2: ResNet-50 transforms the input image in multiple steps. Conceptually, we may access the intermediate transformation of the image after each one of these steps. Source: Bird image from ImageNet.

Existing Methods In PyTorch: Pros and Cons
There were already a few ways of doing feature extraction in PyTorch prior to FX based feature extraction being introduced.
To illustrate these, let’s consider a simple convolutional neural network that does the following

Applies several “blocks” each with several convolution layers within.
After several blocks, it uses a global average pool and flatten operation.
Finally it uses a single output classification layer.

```python
import torch
from torch import nn
class ConvBlock(nn.Module):
   """
   Applies num_layers 3x3 convolutions each followed by ReLU then downsamples
   via 2x2 max pool.
   """
def init(self, num_layers, in_channels, out_channels):
       super().init()
       self.convs = nn.ModuleList(