How to get the value of a feature in a layer that match a the state dict?

I have some cnn, and I want to fetch the value of some intermediate layer corresponding to a some key from the state dict.
How could this be done?
Thanks.