huawei-noah/Pretrained-IPT

Question of task embedding

mrluin opened this issue · 1 comments

Hello,

Thanks for your works!

In your paper, one learnable task embedding is added before decoding, but i cannot find the implementation in your code. Could you please help me how the task embedding works in your work, thanks!

hyunW3 commented

learnable task embedding which you ask might be this one. (In ipy.py file)

self.query_embed = nn.Embedding(num_queries, embedding_dim * self.seq_length)

query_embed = self.query_embed.weight[query_idx].view(-1,1,self.embedding_dim).repeat(1,x.size(1), 1)