wiseodd / controlled-text-generation

Reproducing Hu, et. al., ICML 2017's "Toward Controlled Generation of Text"
BSD 3-Clause "New" or "Revised" License
242 stars 63 forks source link

enc_input #6

Closed haoyangz closed 6 years ago

haoyangz commented 6 years ago

This line seems to assume that the text between sos and eos is always long enough such that there is no padding at the end of the sentence. Why?

wiseodd commented 6 years ago

Thanks for the comment. It would probably better to just do this:

original_sentence = <start> i want to fly <eos>
enc_input = <start> i want to fly <eos> = original_sentence
dec_input = <start> i want to fly <eos> = original_sentence
dec_target = i want to fly <eos> <pad>
wiseodd commented 6 years ago

Fixed in 6f763ad