For machine translation the length of input and output sequences is mostly different. Typically considering an encoder-decoder architecture is used, how does the output come out to be the right length for different sentences, considering that we have to decide the number of output units in advance ?
Asked
Active
Viewed 103 times
2

Hrishikesh Athalye
- 23
- 2
-
"we have to decide the number of output units in advance" what do you mean by this? – shimao Dec 21 '19 at 14:50
-
@shimao I mean that the number of output units is a part of the RNN architecture, for eg - 10 output units. So, it doesn't change according to the input sequence. But the output can have variable lengths for different types of input sentences, for example just 4 words in output. So in that case what happens to the output of the remaining 6 output units? What is their output? – Hrishikesh Athalye Dec 21 '19 at 14:55
1 Answers
0
Typically, the output sentence is decoded until the end of sentence (EOS) is produced. So, the length is determined automatically. The number of output units belonging to an RNN cell is the number of memory units (i.e. dimensions) outputted from the cell.

gunes
- 49,700
- 3
- 39
- 75