Skip to content

Commit

Permalink
Update expansion.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wuch15 authored Apr 13, 2022
1 parent bed1364 commit 9e77e2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def graph_embedding_expansion(Otraining,usernei,alluserembs):
neighbor_embs += [[0.]*HIDDEN]*(NEIGHBOR_LEN-len(neighbor_embs))
else:
neighbor_embs = [[0.]*HIDDEN]*NEIGHBOR_LEN
all_neighbor_embs.append(neighbor_embs)
all_neighbor_embs.append(neighbor_embs)
all_neighbor_embs = all_neighbor_embs[:HIS_LEN]
all_neighbor_embs += [[[0.]*HIDDEN]*HIS_LEN]*(HIS_LEN-len(all_neighbor_embs))
user_neighbor_emb.append(all_neighbor_embs)

user_neighbor_emb = np.array(user_neighbor_emb,dtype='float32')
return user_neighbor_emb


0 comments on commit 9e77e2e

Please sign in to comment.