tae898 / erc

The official implementation of "EmoBERTa: Speaker-Aware Emotion Recognition in Conversation with RoBERTa"
MIT License
88 stars 23 forks source link

text feature extra #24

Closed xuanxuanfeng closed 2 years ago

xuanxuanfeng commented 2 years ago

Hello, I'm a beginner, sorry to bother you, I'm trying to use your model, but I ran into a problem soon, I found that you don't provide a method for text feature extraction, how can I extract it from the raw data text features. I would appreciate it if you could let me know.

xuanxuanfeng commented 2 years ago

I would appreciate it if you could upload the text-feature

tae898 commented 2 years ago

Hey there,

If you make one forward pass to the model, you can extract the text features from it. At the moment, only the feature from the <CLS> token is used for the classification, since this already has most of the information it needs.

xuanxuanfeng commented 2 years ago

Hey, Thank you for your reply. Can I take a look at your text features, I really need them,and if so, you can send them directly to my email xinlong97666@gmail.com.

tae898 commented 2 years ago

Hey sorry I am a bit busy to do it. It won't be so hard and it'd be a good practice for you as well. You can google things like "how to extract features from huggingface transformer models", etc.

xuanxuanfeng commented 2 years ago

Sorry to bother you, I will go and learn about it. Finally, thank you for your answer, thank you very much.

xuanxuanfeng commented 2 years ago

Hello, I would like to ask about the structure of the text features folder, I don't know what format to store the text features in. I extracted some myself but I found that the model cannot be trained with it. Can you show me the text features, I really need them, they'll give me a good guide on how to proceed. Best regards to you.

tae898 commented 2 years ago

Do you mean text-features from below? https://github.com/tae898/multimodal-datasets image

In the end, I didn't extract features per se, but the feature extractor part was optimized together with the classifier. It's getting less common to separate feature descriptors (e.g., HoG, GloVe, etc.) and classifiers (e.g., SVM, decision trees, etc.). We just combine them with deep learning now.

xuanxuanfeng commented 2 years ago

I don't quite understand, if I want to train this model, can I just put the project https://github.com/tae898/multimodal-datasets of yours in the folder /erc/multimodal-datasetsand and run python train-erc-text.py.

xuanxuanfeng commented 2 years ago

Does it mean that I don't need to provide the text features of the dataset before training this model, the text features are generated during the training process.

xuanxuanfeng commented 2 years ago

Hello, After I finished training the model, I tried to run it, but I met some trouble, I don't know the reason why it happened, can you take a look. DO`9S%C0FP0EH74C{JW C 6

tae898 commented 2 years ago

Hey sorry this was not tested on a windows machine:

https://github.com/tae898/erc#prerequisites

xuanxuanfeng commented 2 years ago

Hello dear Taewoon, I have solved this problem. The main cause of this problem is dependency conflicts. And I would like to ask how to use my locally trained model to predict? Do I need to modify in app.py?