The way to extract is not really to index in PyTorch as far as I know.
Your model is only a series of operations, not the values stored in it during forward prop. So, you need to delete the last layer  -
model = models.resnet152(pretrained=True)
modules = list(model.children())[:-1]      # delete the last fc layer.
model = nn.Sequential(*modules)

Now you have a model with the same features but the last layer removed.
Now, if you do model(x) your forward prop will give you the features. Similarly, if you want to extract output with 2 layers removed, just change that line to model.children())[:-2] and it will remove the last 2 layers.
Hope this helps!