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

train.py fails with error "too many indices for tensor of dimension 2" #6

Open
domcross opened this issue Feb 8, 2020 · 2 comments

Comments

@domcross
Copy link

domcross commented Feb 8, 2020

Training fails with following error message:

  File "/path/to/project/Transformer-TTS/loss.py", line 33, in guide_loss
    W[i, :T, :L] += alignments[0].new_tensor(1-torch.exp(-12.5*x))
IndexError: too many indices for tensor of dimension 2
@LEEYOONHYUNG
Copy link
Collaborator

Do you change the file 'functional.py' in original pytorch package following the description at the bottom of the README.md? I think it can cause the problem.

Also, I revise this repository, so you can check it again.

@domcross
Copy link
Author

Ok, I didn't see that. Maybe move it to a more prominent place in the README?

I changed the line in functional.py and now training works. Thanks.

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