# Getting final layer of textcat

**URL:** <https://support.prodi.gy/t/getting-final-layer-of-textcat/833>\
**Category:** Uncategorized\
**Tags:** textcat, spacy\
**Created:** [September 21, 2018, 4:57pm UTC](https://support.prodi.gy/t/getting-final-layer-of-textcat/833 "2018-09-21T16:57:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![honnibal](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/honnibal/32/35_2.png) [@honnibal](https://support.prodi.gy/u/honnibal)\
**Post date:** [September 21, 2018, 8:05pm UTC](https://support.prodi.gy/t/getting-final-layer-of-textcat/833/2 "2018-09-21T20:05:43Z")

</div>

The code in this thread might be useful, especially my reply about getting the attention weights: [Highlighting the matching words for text classfication](https://support.prodi.gy/t/highlighting-the-matching-words-for-text-classfication/254/6?u=honnibal)

The general approach is to attach a wrapper around some layer of the text classifier’s model. In the wrapper, you can capture inputs and outputs and write them somewhere, before communicating through the wrapped layer. This is a general solution for getting access to any of the internal representations in one of the models.

---

_[View the full topic](https://support.prodi.gy/t/getting-final-layer-of-textcat/833)._
