I am using Resnet34 pre-trained model and trying to get the intermediate layer outputs by doing  model.feature_list(input)  (input.shape = [2,3,32,32]) the outputs are of shape [2, 64, 32, 32],  [2, 64, 32, 32], [2, 128 16 16], [2,256,8, 8], and [2, 512, 4, 4].
How can I write a new customized CNN code which would respond to a “model.feature_list(input)” command and provides the intermediate layer outputs.