Skip to content

Commit

Permalink
fix some bugs. update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ken77921 committed Nov 13, 2023
1 parent 04a0ead commit 79e5600
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ Haw-Shiuan Chang, Nikhil Agarwal, and Andrew McCallum. 2024. To Copy, or not to
```

## License
The code from Recbole is under [MIT License](https://github.com/RUCAIBox/RecBole/blob/master/LICENSE) but our modification (e.g., Softmax-CPR implementation) is under Apache-2.0 license.
All RecBole data and code are under [MIT License](https://github.com/RUCAIBox/RecBole/blob/master/LICENSE) and can only be used for academic purposes (as indicated in https://github.com/RUCAIBox/RecBole#license on 10/25/2023).
Our modification (e.g., Softmax-CPR implementation) is under Apache-2.0 license and could be used for commercial purpose.
2 changes: 1 addition & 1 deletion recbole/model/sequential_recommender/gru4rec_ours.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def calculate_loss_prob(self, interaction):
#logits = torch.matmul(seq_output, test_item_emb.transpose(0, 1))
#loss = self.loss_fct(logits, pos_items)
#return loss
return loss, prediction_prob.squeeze(dim=0)
return loss, prediction_prob.squeeze(dim=1)

def calculate_loss(self, interaction):
loss, prediction_prob = self.calculate_loss_prob(interaction)
Expand Down
2 changes: 1 addition & 1 deletion recbole/model/sequential_recommender/sasrec.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def calculate_loss_prob(self, interaction):
raise Exception("Labels can not be None")
#logits = torch.matmul(seq_output, test_item_emb.transpose(0, 1))
#loss = self.loss_fct(logits, pos_items)
return loss, prediction_prob.squeeze(dim=0)
return loss, prediction_prob.squeeze(dim=1)

def calculate_loss(self, interaction):
loss, prediction_prob = self.calculate_loss_prob(interaction)
Expand Down

0 comments on commit 79e5600

Please sign in to comment.