Skip to content

Commit

Permalink
Update diffnet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiJieSun authored Oct 23, 2019
1 parent a4efe58 commit 0f22078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diffnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def inputSupply(self, data_dict):

def convertDistribution(self, x):
mean, var = tf.nn.moments(x, axes=[0, 1])
y = (x - mean) * 0.1 / tf.sqrt(var)
y = (x - mean) * 0.2 / tf.sqrt(var)
return y

def generateUserEmbeddingFromSocialNeighbors(self, current_user_embedding):
Expand Down Expand Up @@ -104,7 +104,7 @@ def constructTrainGraph(self):

#self.fusion_user_embedding = self.user_fusion_layer(\
# tf.concat([self.user_embedding, second_user_review_vector_matrix], 1))
self.fusion_user_embedding = self.user_embedding #+ second_user_review_vector_matrix
self.fusion_user_embedding = self.user_embedding + second_user_review_vector_matrix
first_gcn_user_embedding = self.generateUserEmbeddingFromSocialNeighbors(self.fusion_user_embedding)
second_gcn_user_embedding = self.generateUserEmbeddingFromSocialNeighbors(first_gcn_user_embedding)

Expand Down

0 comments on commit 0f22078

Please sign in to comment.