I want to implement a Encoder-Decoder architecture, im planning to use some of the models which are available in pytorch as encoders, But how do i extract features from a particular layer of the backbone model?

For Eg: If i want to use VGG16 as my backbone net how will get features from a particular layer of VGG16