The implementation of the peer layer seems to be wrong
https://github.com/huyphan168/PEER/blob/9d8ea04821c5aa4987733e105f3dbd596a5e89ca/peer/model.py#L94
The correct version should like this
(scores_x,indices_x), ( scores_y, indices_y) = [s.topk(self.product_key_topk, dim=-1) for s in sim]
2 条评论