k2-fsa / fast_rnnt

A torch implementation of a recursion which turns out to be useful for RNN-T.
Other
136 stars 22 forks source link

CUDA error #7

Closed jiay7 closed 2 years ago

jiay7 commented 2 years ago

I have the following problems when using rnnt_loss_simple:

1655195372(1)

I checked the shape of the input tensor: 1655195453(1)

and the output of the code: 1655195474(1)

python=3.8.11 torch verison=1.10.1 cudatoolkit=10.2.89 CUDA version=10.2.

Is this a known issue? How can it be debugged and solved?

Thank you!

csukuangfj commented 2 years ago

What is your vocabulary size ?

jiay7 commented 2 years ago

I use this loss in my own RNNT model. The dictionary size is 4233

pkufool commented 2 years ago

could you post your vocab size?


---- Replied Message ----
From
Date 06/14/2022 16:32
To
Cc
Subject [danpovey/fast_rnnt]  CUDA error (Issue #7)

I have the following problems when using rnnt_loss_simple:

1655195372(1)

I checked the shape of the input tensor:
1655195453(1)

and the output of the code:
1655195474(1)

python=3.8.11 torch verison=1.10.1 cudatoolkit=10.2.89 CUDA version=10.2.

Is this a known issue? How can it be debugged and solved?

Thank you!


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <danpovey/fast_rnnt/issues/7@github.com>

jiay7 commented 2 years ago

I use char as the modeling unit, like:

1655196217(1)

csukuangfj commented 2 years ago

dec_out_smoothed.shape MUST be (N, U, vocab_size)

Also, enc_out_smoothed.shape MUST be (N, T, vocab_size).

You are using 512 for the last dim of dec_out_smoothed and enc_out_smoothed, which is not correct.

See the doc https://github.com/danpovey/fast_rnnt/blob/134c1bcc6a77b8692faf6c807cb6a5ef3b7017f6/fast_rnnt/python/fast_rnnt/rnnt_loss.py#L209-L220

jiay7 commented 2 years ago

Yes, you are right. I changed the output dim of lin_dec_smoothed and lin_enc_smoothed, and it works. Thank you.