# Get intermediate result from pre\_classifier layer

**URL:** <https://discuss.huggingface.co/t/get-intermediate-result-from-pre-classifier-layer/34736>\
**Category:** Beginners\
**Created:** [March 27, 2023, 12:07am UTC](https://discuss.huggingface.co/t/get-intermediate-result-from-pre-classifier-layer/34736 "2023-03-27T00:07:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrowlingM1ke](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@GrowlingM1ke](https://discuss.huggingface.co/u/GrowlingM1ke)\
**Post date:** [March 27, 2023, 12:07am UTC](https://discuss.huggingface.co/t/get-intermediate-result-from-pre-classifier-layer/34736/1 "2023-03-27T00:07:09Z")

</div>

Hello,

I’m trying to transfer learn the features from the following pre-trained model ‘bhadresh-savani/distilbert-base-uncased-emotion’. Using the following function call:

`checkpoint_sentiment = 'bhadresh-savani/distilbert-base-uncased-emotion'`  
`sentiment_config = AutoConfig.from_pretrained(checkpoint_sentiment, output_attentions=True,output_hidden_states=True)`  
` self.model_sentiment = AutoModelForSequenceClassification.from_pretrained(checkpoint_sentiment,config=sentiment_config)`

When I look at the modules I get the following 4 final layers:

- pre\_classifier.weight
- pre\_classifier.bias
- classifier.weight
- classifier.bias

Is it possible to get the intermediate value from pre\_classifier? My aim is to get the 768-dimensional feature and use it for a different part of the larger model.

Thanks!
