Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch ValueError #1

Open
amitsou opened this issue Aug 1, 2022 · 12 comments
Open

Pytorch ValueError #1

amitsou opened this issue Aug 1, 2022 · 12 comments

Comments

@amitsou
Copy link

amitsou commented Aug 1, 2022

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
Copy link
Author

amitsou commented Aug 1, 2022

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
Copy link
Owner

Sreyan88 commented Aug 2, 2022

Hi @amitsou ,

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

@Coding511
Copy link

@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
Copy link
Owner

Sreyan88 commented Oct 27, 2022

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
Copy link

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

@Sreyan88
Copy link
Owner

it is under review

@Sreyan88
Copy link
Owner

Sreyan88 commented Jun 6, 2023

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
Copy link

@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
Copy link
Owner

Sreyan88 commented Jun 11, 2023

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

@Coding511
Copy link

@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
Copy link
Owner

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

@Coding511
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants