Ok I don’t think I can help you with the first problem but for the second one you should be able to just get the outputs of the cnn layers not the linear layers. It depends on the model though. What model were you thinking?