Transformers-Tutorials icon indicating copy to clipboard operation
Transformers-Tutorials copied to clipboard

trying to access VisionEncoderDecoderModel DONUT encoder intermediate layers

Open AbdulDD opened this issue 1 year ago • 0 comments

Hi there, I have successfully fine-tuned DONUT on my custom dataset for Key-Information extraction (KIE). I have also printed (accessed) last_hidden_state of encoder. Now encoder has 4 layers (model.encoder.num_layers) and I want to access Layer 1 or 2 hidden state. how can I do that?

AbdulDD avatar Jul 05 '24 06:07 AbdulDD