yqchau / recommender-systems

This repository contains several state-of-the-art models of recommender system created using the PyTorch framework.
17 stars 5 forks source link

CoNet implements confusion #1

Open Hutai opened 2 years ago

Hutai commented 2 years ago

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

yqchau commented 2 years ago

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

Hutai commented 2 years ago

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

image
yqchau commented 2 years ago

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 commented 2 years ago

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