HawkAaron / RNN-Transducer

MXNet implementation of RNN Transducer (Graves 2012): Sequence Transduction with Recurrent Neural Networks
136 stars 31 forks source link

question in greedy decoder #7

Closed rzcwade closed 5 years ago

rzcwade commented 5 years ago

Hi @HawkAaron ,

I don't quite understand why you have vocab_size-1 in your model.py greedy_decode code line 70: y = mx.nd.zeros((1, 1, self.vocab_size-1)) # first zero vector Could you tell me what vocab you're excluding here?

Thanks!

HawkAaron commented 5 years ago

For the input of prediction network, there is no need to keep blank, so the vector should be sized vocab_size - 1. Meanwhile, the output includes blank. Just like the <eos> in sequence-to-sequence training, keep it or not doesn't matter.

rzcwade commented 5 years ago

Thank you for clarifying this! It's all clear now :)