hred icon indicating copy to clipboard operation
hred copied to clipboard

dataloader and result

Open Ri0S opened this issue 6 years ago • 2 comments

https://github.com/hsgodhia/hred/blob/3ec59b6ad29a6db1b77379ac31ccc94eea628adf/util.py#L69 https://github.com/hsgodhia/hred/blob/3ec59b6ad29a6db1b77379ac31ccc94eea628adf/util.py#L72

I think it breaks the alignment. for example there are [u0_1, u0_2, u0_3], [u1_1, u0_2, u0_3] data, but after the alignment, the data can be [u0_1, u1_2, u0_3], [u1_1, u0_2, u1_3] Is it ok to change the order of the data because of the sorting?

also, in the result, there are so many 'i don't know', 'i am sorry', '' is the result correct?

Ri0S avatar May 31 '18 07:05 Ri0S

I have the same problem, is this the sacrifice of the association between sentences in exchange for improved performance? (by raising batch_size)

RobinYang125 avatar Jun 22 '18 10:06 RobinYang125

We sort by length, because when processing different length sequences pytorch provides a method torch.nn.utils.rnn.pack_padded_sequence(target_emb, target_lens, batch_first=True) which requires that the matrix be sorted by length (max length first). I understand that probably this breaks the association between the tuple (u1, u2, u3) . We can probably sort by the lengths of u1 (the 1st utterance) and then during decode time again sort by the u3 (final response). I'll move the sort inside of the modules forward incase of u3 and have the dataloader sort by u1 only. Thanks for reporting the issue @Ri0S @mortimer125 ! In terms of the results, "I don't know " does dominate the results as much as I have seen especially in open domain non-goal oriented dialogue with no external facts/kb conditioning

hsgodhia avatar Jun 22 '18 17:06 hsgodhia