# Hidden\_states Transformers for computer vision

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhidden-states-transformers-for-computer-vision%2F20683%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 21, 2022, 12:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhidden-states-transformers-for-computer-vision%2F20683 "2022-07-21T12:56:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanlions](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@kanlions](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkanlions)%5C
**Post date:** [July 21, 2022, 12:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhidden-states-transformers-for-computer-vision%2F20683%2F1 "2022-07-21T12:56:19Z")

</div>

Hi all,  
I am having trouble in interpreting the hidden\_state and last\_hidden\_state indexing with respect to transformer models for computer vision

which layer output is the last\_hidden state. Example in a swin transformer tiny the hidden\_state returns a tuple of 5 with sizes 3136x96, 784x192, 196x38, 49x768 and 49x768 respectively. I tried to view them but I was not able to get the last\_hidden\_state from the tuples of hidden\_state.  
Similar problem I faced in VIT models too  
Please can anyone help in understanding these embeddings from Model output class specially for transformers of computer vision as I am trying to find some interpretibility from the model outputs.

Thanks in advanced
