BertForSequenceClassification: Can I get the last hidden state?

Hi all,

Is there a way to get the last hidden state (only) from a BertForSequenceClassification instance?

If I enable the output_hidden_states=True config option, I get an out of memory error during evaluation.

Regards,

George