How to remove some layers in Resnet18?

You can use the hook to pull the Conv1 output and ignore the rest.

Better Solution in this post