Thank you for the detailed example!
so to make sure that I understand it correctly, I need to create a specific forward hook for each layer that I want its features to be extracted?
first I do the forward pass, all the layers updated accordingly and only then I can access specific layers with their vector representations?
and there is no generic way to make a forward pass up to a specific layer?
for example:
output = model.fc2(x)