# Intermediate features from a Huggingface pretrained model

**URL:** <https://discuss.huggingface.co/t/intermediate-features-from-a-huggingface-pretrained-model/57830>\
**Category:** 🤗Transformers\
**Created:** [October 8, 2023, 10:07pm UTC](https://discuss.huggingface.co/t/intermediate-features-from-a-huggingface-pretrained-model/57830 "2023-10-08T22:07:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SD01](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@SD01](https://discuss.huggingface.co/u/SD01)\
**Post date:** [October 8, 2023, 10:07pm UTC](https://discuss.huggingface.co/t/intermediate-features-from-a-huggingface-pretrained-model/57830/1 "2023-10-08T22:07:50Z")

</div>

Hi everyone, I am new to using the Huggingface library. I want to use the TimeSformer or the VideoMAE pretrained model for my research. I want the output from the e.g., 3rd layer of a pretrained model.  
So can I do it as follows?

```auto
model = TimesformerModel.from_pretrained("facebook/timesformer-base-finetuned-k400")
outputs = model(**inputs)
final_out = outputs.hidden_states[2]

```

Is that the correct way? Or am I missing any other details?  
Also, where can I find the list of the pretrained checkpoints? e.g., I want to use the k600 models

Thanks a lot!
