How to construct SPB
Dear author,
Thank you for your great work. I could not find the content in terms of the construction of the SPB, because the sentence feature will be updated by the SPB, could you kindly point out which part in the code related with the SPB?
Thanks
Thanks for your kind attention. The construction of SPB is https://github.com/QtacierP/PRIOR/blob/086bf2e0d379d7dacc47a6ad738ffabc1ad6e25f/codes/prior/models/prior.py#L58
and we use it in the forward process, like https://github.com/QtacierP/PRIOR/blob/086bf2e0d379d7dacc47a6ad738ffabc1ad6e25f/codes/prior/models/prior.py#L455
Thanks for your kind attention. The construction of SPB is
PRIOR/codes/prior/models/prior.py
Line 58 in 086bf2e
self.sentence_bank = SPB(embed_dim, spb_k) and we use it in the forward process, like
PRIOR/codes/prior/models/prior.py
Line 455 in 086bf2e
proto_local_text_embed_stacks, proto_loss, embed_ind = self.sentence_bank(torch.cat(local_text_embed_stacks, dim=0))
Thank you for your quick reply. So the SPB module is learnable during the training process, right?