How to extract the intermediate layers of vgg16 model

I am trying to extract intermediate feature layers of vgg16 using python on spyder IDE, and then looking to compress the feature map.

Looking for answers,…

do you mean the weights or the activations? for the activations i posted a method here: I saved the quantized weight and loaded it with the model after torch.ao.quantization.convert(). how do I print the output of each layer of the network?

for hte weights you can just print them with something like

for name, param in model.named_parameters():
   print(name, param)