Skip to content

Commit

Permalink
Update VGCL.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yimutianyang authored May 31, 2023
1 parent e2262de commit 403bd31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/VGCL.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def graph_encoder(self):
### reparameterization
noise1 = tf.random_normal(std.shape)
noise2 = tf.random_normal(std.shape)
noised_emb1 = mean + 0.01 * std * noise1
noised_emb2 = mean + 0.01 * std * noise2
noised_emb1 = mean + std * noise1
noised_emb2 = mean + std * noise2
return noised_emb1, noised_emb2, mean, std


Expand Down Expand Up @@ -155,4 +155,4 @@ def compute_cl_loss_cluster(self):
log_probs_item = tf.math.divide_no_nan(log_probs_item, num_item_pos_per_cow)
cl_loss_item = -tf.reduce_mean(tf.math.log(log_probs_item))
cl_loss = self.alpha * (cl_loss_user + cl_loss_item)
return cl_loss
return cl_loss

0 comments on commit 403bd31

Please sign in to comment.