Homework 9
The dair-ai/emotion dataset classifies tweets by 6 emotions: sadness, joy, love, anger, fear, surprise. Thus, we can train word vectors of 6 dimensions on it, and we can interpret the mean pool of the word vectors in a text as 6 logits for the 6 classes.
Modify the code of Notebook 0721 to do this. In particular, you'll need to use multiclass accuracy and cross-entropy. Get the word vectors of your best performing model. Using softmax, you can get the class probabilities per word vector. For all 6 classes, print the class name, and the 10 words with the word vectors with the largest class probability.