-
Notifications
You must be signed in to change notification settings - Fork 22
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
AssertionError: assert py.is_contiguous() #14
Comments
If I remember correctly, the cpp code is using tensor accessor to access the data, which does not require a contiguous tensor. But a contiguous tensor is more cache friendly, so I suggest changing it to px = px.contiguous() |
So, theoretically commenting these two assertions won't affect the performance... right? And changing the tensors to |
It says right there, it's for efficiency, so yes, using non-contiguous tensors will affect the performance. Making that copy may not necessarily require more memory, it depends whether the original (before the copy) is required for backprop. I suggest to try adding the .contiguous() statement before the log_softmax, if possible, since likely the log_softmax needs the output of its operation for the backprop (but not the input), so the copy prior to the .contiguous() before the log_softmax likely would not be held for backprop. |
@danpovey I'm sorry I didn't get what you mean by "adding the .contiguous() statement before the log_softmax". By ".contiguous() statement", you meant Also, which |
At some point in the RNN-T computation there is a normalization of log-probs, probably via log_softmax(). I meant doing it just before then. |
I think you don't need to check whether it is
|
Thanks for the help! |
@Anwarvic Where do you add this line, I think there is |
Ok, I think I forgot |
My issue was in the |
Yes, I meaned we won't call |
I'm working on integrating FastRNNT with Speechbrain, check this Pull Request.
At the current moment, I'm trying to train a transducer model on the multilingual TEDx dataset (mTEDx) for French. Whenever I train my model, I get this assertion error (he issue's title). However, it says in the mutual_information.py file that:
Once I comment these two lines, everything works just fine. Using a transducer model with an encoder of wav2vec2 pre-trained model + one linear layer, and a one layer GRU as a decoder, the model trains just fine and I got 14.37 WER on the French test set which is way better than our baseline.
Now, I have these two questions:
AssertionError
?Your guidance is much appreciated!
The text was updated successfully, but these errors were encountered: