Skip to content

Commit

Permalink
Fix: inter_feature is self-quadratic
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyBag authored Dec 14, 2019
1 parent 1853bd4 commit dab66a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions GraphNCF/GCFmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def forward(self, laplacianMat,selfLoop,features):
L1 = laplacianMat + selfLoop
L2 = laplacianMat.cuda()
L1 = L1.cuda()
inter_feature = torch.mul(features,features)
inter_feature = torch.sparse.mm(L2,features)
inter_feature = torch.mul(inter_feature,features)

inter_part1 = self.linear(torch.sparse.mm(L1,features))
inter_part2 = self.interActTransform(torch.sparse.mm(L2,inter_feature))
Expand Down Expand Up @@ -179,4 +180,4 @@ def forward(self,userIdx,itemIdx):

rt['userId'] = rt['userId'] - 1
rt['itemId'] = rt['itemId'] - 1
gcf = GCF(userNum,itemNum,rt)
gcf = GCF(userNum,itemNum,rt)

0 comments on commit dab66a1

Please sign in to comment.