recommender-systems icon indicating copy to clipboard operation
recommender-systems copied to clipboard

CoNet implements confusion

Open Hutai opened this issue 2 years ago • 4 comments

For code: https://github.com/yqchau/Recommender-Systems/blob/main/model/CoNet/model.py#L93-L94 is it necessary to add cur_dx?

Hutai avatar Aug 29 '22 11:08 Hutai

Hey, seems like it's not really needed. Do you mind making a pull request fixing it?

yqchau avatar Aug 29 '22 13:08 yqchau

If not, wouldn't the code implementation of Cross Unit look like this? image

Hutai avatar Aug 29 '22 13:08 Hutai

My bad, the correct way to implement it would be

if (l < self.cross_layer):
    cur_d1 += torch.matmul(pre_d2, self.weights_shared[l])
    cur_d2 += torch.matmul(pre_d1, self.weights_shared[l])

Do note that this implementations assume that there are more layers after the cross connection layers.

yqchau avatar Aug 29 '22 13:08 yqchau

Thanks for pointing out the typo, will have a revamp of this repo in the near future to double check for any mistake

yqchau avatar Aug 29 '22 13:08 yqchau