This repository was archived by the owner on Oct 9, 2023. It is now read-only.
Combine BertForSequenceClassificaion with Additional Features #354
Unanswered
oritcohavi92
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm using TextClassifier (BertForSequenceClassification + Pytorch Lightning-Flash) for a text classification task. I want to add additional features besides the text (e.g. categorical features). From what I understand, I need to override BertForSequenceClassification "forward" method and change the final classification layer (at least) to include the CLS vector + features vector. However, I didn't understand how I adapt the data loading procedure to this task - the text part is represented as input ids, and the rest supposed to be represented differently. Is there a simple way to combine text+features for Bert classification task? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions