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

About data augment #38

Open
Catekato opened this issue Oct 27, 2023 · 2 comments
Open

About data augment #38

Catekato opened this issue Oct 27, 2023 · 2 comments

Comments

@Catekato
Copy link

Hi!
Thanks so much for this work! When I tried to train the model on AudioCaps (didn't change the training script other than file paths), I got this issue:
File "/tango/train.py", line 553, in
main()
File "/tango/train.py", line 459, in main
mixed_mel, _, _, mixed_captions = torch_tools.augment_wav_to_fbank(audios, text, len(audios),
File "/tango/tools/torch_tools.py", line 118, in augment_wav_to_fbank
waveform, captions = augment(paths, texts)
File "/tango/tools/torch_tools.py", line 108, in augment
waveform = torch.tensor(np.concatenate(mixed_sounds, 0))
File "<array_function internals>", line 180, in concatenate
ValueError: need at least one array to concatenate

It would be highly appreciated if you could kindly help me with this problem, thanks!

@deepanwayx
Copy link
Collaborator

deepanwayx commented Oct 28, 2023

It seems like the length of texts is 1. The last batch of the training data may have only one instance, and then this error would come up. Did this happen at the end of the training loop?

I have made a few small changes in the train.py to handle this. Let me know if that fixes the issue.

I am assuming you used the per device train batch size of at least 2. Augmentation won't work with batch size of 1.

@Catekato
Copy link
Author

It seems like the length of texts is 1. The last batch of the training data may have only one instance, and then this error would come up. Did this happen at the end of the training loop?

I have made a few small changes in the train.py to handle this. Let me know if that fixes the issue.

I am assuming you used the per device train batch size of at least 2. Augmentation won't work with batch size of 1.

Thanks for your help! The problem occurred before training started, when I tried to run the new train.py, I got the typical "cuda out of memory" error. Have you ever tried to train without data augment, how's the result?

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

2 participants