0

I have variable length for each training data which I have padded to zero keeping the length of the longest variable as the constant length. After getting the data trained how do I get the original data back? Is there a way to train in Seq2Seq encoder decoder network without padding to zeros for variable length data for both training and test?

Crossfit_Jesus
  • 53
  • 4
  • 18
  • 1
    You need to understand that all deep learning libraries use tensor operation functions. This means that your data should be packed into a tensor, and to do so, your data need to have equal sequence length. To get the output data back to sentence, you can define your dictionary to map output index to each word you want. – Chompakorn CChaichot Mar 26 '20 at 02:52
  • @ChompakornCChaichot : Thanks. Yes I realized that's what is popularly done in Machine translation. But I'm working with speech files and spectrograms. So I don't know how to get that back from the seq2seq decoder. – Crossfit_Jesus Mar 26 '20 at 09:51
  • Spectrogram also use zero padding with mask layer. Just like normal LSTM implementation, you can treat each frame of spectrogram as one timestep. – Chompakorn CChaichot Mar 26 '20 at 16:17

0 Answers0