I am trying to access the hidden layers when using TransformerEncoder and TransformerEncoderLayer. I could not find anything like that in the source code for these classes.
I am not using hugging face but I know one can get hidden_states and last_hidden_state. I am looking for something similar.
Do you know how I can access them?