I'm currently having text inputs represented by vector, and I want to classify their categories. Because they are multi-level categories, I meant to use Hierarchical Softmax
.
Example:
- Computer Science
- Machine Learning
- NLP
- Economics
- Maths
- Algebra
- Geometry
I don't know how to implement it in Tensorflow. All examples I've met is using other frameworks.
Thanks
Finally, I have changed to use Pytorch. It's easier and more straight-forward than Tensorflow.
For anyone further interested in implement HS, you can have a look at my sample instructions: https://gist.github.com/paduvi/588bc95c13e73c1e5110d4308e6291ab
For anyone still want a Tensorflow implementation, this one is for you: https://github.com/tansey/sdp/blob/87e701c9b0ff3eacab29713cb2c9e7181d5c26aa/tfsdp/models.py#L205. But it's a little messy, and the author recommended using Pytorch or other dynamic graph framework