Skip to content

Commit 4f76169

Browse files
authored
Merge pull request #1217 from chenyuwuxin/master
FIX: code optimization of SRGNN
2 parents 430db16 + 2cc57ea commit 4f76169

File tree

1 file changed

+1
-1
lines changed
  • recbole/model/sequential_recommender

1 file changed

+1
-1
lines changed

recbole/model/sequential_recommender/srgnn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _get_slice(self, item_seq):
177177
# The relative coordinates of the item node, shape of [batch_size, max_session_len]
178178
alias_inputs = torch.LongTensor(alias_inputs).to(self.device)
179179
# The connecting matrix, shape of [batch_size, max_session_len, 2 * max_session_len]
180-
A = torch.FloatTensor(A).to(self.device)
180+
A = torch.FloatTensor(np.array(A)).to(self.device)
181181
# The unique item nodes, shape of [batch_size, max_session_len]
182182
items = torch.LongTensor(items).to(self.device)
183183

0 commit comments

Comments
 (0)