macabdul9 / CASA-Dialogue-Act-Classifier

PyTorch implementation of the paper "Dialogue Act Classification with Context-Aware Self-Attention" for dialogue act classification with a generic dataset class and PyTorch-Lightning trainer
MIT License
44 stars 13 forks source link

Classifier ouputs `hidden_size` values #3

Closed glicerico closed 3 years ago

glicerico commented 3 years ago

If I understand correctly, the last layer in the ContextAwareDAC is the classifier, and should output as many values as classes there are, as suggested by this line also: https://github.com/macabdul9/CASA-Dialogue-Act-Classifier/blob/92358d05491099b1de83285260d4a19027728b13/models/ContextAwareDAC.py#L34

However, the constructor of the model seems to pass a number of classes that's equal to the hidden_size parameter in config: https://github.com/macabdul9/CASA-Dialogue-Act-Classifier/blob/92358d05491099b1de83285260d4a19027728b13/Trainer.py#L38

I am guessing this is a typo, and it should say instead

num_classes=self.config['num_classes']

Also, there's no other use of config['num_classes'] anywhere else in the repository, which makes me suspect the typo even more.

macabdul9 commented 3 years ago

Thanks, @glicerico for pointing it out. It was a typo and I have fixed it. Closing the issue.