arghosh / AKT

MIT License
93 stars 31 forks source link

A bug of Rasch Model-Based Embeddings, Please check it! #8

Closed ICDATwang closed 2 years ago

ICDATwang commented 2 years ago

In line 83 of akt.py, the shape of qa_data is [BS, seqlen, 2], but in line 42, self.qa_embed_diff = nn.Embedding(2 * self.n_question + 1, embed_l), the embedding input dims is inconsistent, is this right?

Please check it! Thanks!

arghosh commented 2 years ago

Hi, I think, if self.separate_qa=True, qa_data shape is [BS, Seqlen] (line 72) with value from 0 to 2n_question+1 (line 45) and self.qa_embed_diff = nn.Embedding(2 self.n_question + 1, embed_l). When self.separate_qa=False, qa_data shape is [BS, Seqlen] (line 76) with value from 0 to 1 (line 48) and self.qa_embed = nn.Embedding(2, embed_l).

ICDATwang commented 2 years ago

When self.separate_qa=False, qa_data shape is [BS, Seqlen] (line 76) with value from 0 to 1 (line 48) and self.qa_embed = nn.Embedding(2, embed_l). But, if self.n_pid > 0, (line 83) qa_embed_diff_data = self.qa_embed_diff(qa_data), and (line 42) self.qa_embed_diff = nn.Embedding(2 self.n_question + 1, embed_l), the shape of qa_data is inconsistent with "2 self.n_question + 1". Please check it again! Thanks!

ICDATwang commented 2 years ago

When self.separate_qa=False, qa_data shape is [BS, Seqlen] (line 76) with value from 0 to 1 (line 48) and self.qa_embed = nn.Embedding(2, embed_l).

But, if self.n_pid > 0, (line 83) qa_embed_diff_data = self.qa_embed_diff(qa_data), and (line 42) self.qa_embed_diff = nn.Embedding(2 self.n_question + 1, embed_l), the shape of qa_data is inconsistent with "2 self.n_question + 1".

Please check it again! Thanks!

来自 Outlookhttp://aka.ms/weboutlook


发件人: Aritra Ghosh @.> 发送时间: 2021年12月2日 18:06 收件人: arghosh/AKT @.> 抄送: ICDATwang @.>; Author @.> 主题: Re: [arghosh/AKT] A bug of Rasch Model-Based Embeddings, Please check it! (Issue #8)

Hi, I think, if self.separate_qa=True, qa_data shape is [BS, Seqlen] (line 72) with value from 0 to 2n_question+1 (line 45) and self.qa_embed_diff = nn.Embedding(2 self.n_question + 1, embed_l). When self.separate_qa=False, qa_data shape is [BS, Seqlen] (line 76) with value from 0 to 1 (line 48) and self.qa_embed_diff = nn.Embedding(2 * self.n_question + 1, embed_l).

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/arghosh/AKT/issues/8#issuecomment-985153883, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ4VC2CUZKI4ZOPGOGBONLLUPAQ3XANCNFSM5I6TLW3A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

arghosh commented 2 years ago

Yes, you are right. only 0 and 1 is used, rest of them are not updated. You can change line 42 depending on the condition. It would be the same.