Custom pre-trained model remove layer

Hello everyone,
I am trying to use my own pre-trained model to train another network.
My model looks as below:

image

I am trying to change the conv11 to Conv1d(128,15)… but how can I access to this conv11 layer?

self.model = nn.Sequential(*list(self.model.children())[:-1]), this will result deleting the whole model and return an empty list .

I guess you could access it directly via model.conv11.

PS: you can post code snippets by wrapping them into three backticks ```, which would make debugging easier. :wink:

@ptrblck thank you for the help!
Your solution worked out nicely