Sreyan88 / MMER

Code for the InterSpeech 2023 paper: MMER: Multimodal Multi-task learning for Speech Emotion Recognition
https://arxiv.org/abs/2203.16794
61 stars 14 forks source link

Pytorch ValueError #1

Open amitsou opened 2 years ago

amitsou commented 2 years ago

Hi, I'm trying to implement your paper. At this point, I'm trying to use textual information, in order to extract Bert's features. For that reason, I tried executing train_and_validate.py using my dataset. The dataset consists of tweeter comments and their correspondent sentiment (I have 3 classes for sentiment: 0 for negative, 1 for neutral, and 2 for positive). When I execute the following line of code

engine.learn(train_loader,val_loader,model,optimizer,scheduler)

I get the following error:

if size_average is not None or reduce is not None: 2995 reduction = _Reduction.legacy_get_string(size_average, reduce) 2996 return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) 2997 2998

ValueError: Expected input batch_size (4) to match target batch_size (2048).

Can you pls look into that?

amitsou commented 2 years ago

I think that the code stops execution when you call on_forward function and more specifically at this point:

self.state['output'] = model

Moreover, why do you use train_loader[0], and why its shape is (4,512)?

Sreyan88 commented 2 years ago

Hi @amitsou ,

Thank You for reporting the issue. Let me try reproducing your error. @ramaneswaran @hvarS please see if you can help.

Coding511 commented 1 year ago

@Sreyan88, where is this paper published? I mean, which journal or conference, Sir? I want to cite this work for comparison with mine. please reply asap. Thanks

Sreyan88 commented 1 year ago

You can cite the arxiv version for now:

@article{srivastava2022mmer,
  title={MMER: Multimodal Multi-task learning for Emotion Recognition in Spoken Utterances},
  author={Ghosh, Sreyan and Srivastava, Harshvardhan and Umesh, Srinivasan},
  journal={arXiv preprint arXiv:2203.16794},
  year={2022}
}
Coding511 commented 1 year ago

@Sreyan88 This is not my question sir, I am asking where is this paper published sir? regards

Sreyan88 commented 1 year ago

it is under review

Sreyan88 commented 1 year ago

Extremely sorry for the delay in response. Our paper has been accepted to InterSpeech 2023, and we have pushed new code with improved performance. Please let us know of any bugs that exist.

Coding511 commented 1 year ago

@Sreyan88 Sorry but stil this code is not working. Could you please tell us how to run this python code locally with Edior? If we could not run it how could we refer this paper?

Sreyan88 commented 1 year ago

@Coding511 can you please paste the error? And at which step are you facing the issue?

Coding511 commented 1 year ago

@Sreyan88 Thank you for this prompt response sir. How can I execute this code in Spyder or any editor after saving the code locally?

Sreyan88 commented 1 year ago

I would suggest following the instructions in readme and letting us know of any issues from there!

Coding511 commented 1 year ago

I have downloaded all the dependencies as mentioned in your readme file. Now how to execute it locally, or in other words is there any way to execute without shell file.