Transformer-TTS icon indicating copy to clipboard operation
Transformer-TTS copied to clipboard

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

Open domcross opened this issue 5 years ago • 2 comments

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

domcross avatar Feb 08 '20 08:02 domcross

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.

LEEYOONHYUNG avatar Feb 19 '20 08:02 LEEYOONHYUNG

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.

domcross avatar Feb 20 '20 08:02 domcross