Skip to content

Commit

Permalink
Merge pull request #5477 from FederatedAI/feature-2.0.0-rc-sshe-glm
Browse files Browse the repository at this point in the history
fix lr loss(#5466)
  • Loading branch information
dylan-fan authored Jan 31, 2024
2 parents f412237 + 0ee456a commit 5830689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/fate/ml/glm/hetero/coordinated_lr/guest.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def asynchronous_compute_gradient(self, batch_ctx, encryptor, w, X, Y, weight):
loss += torch.matmul((1 / h * Xw).T, Xw_h) - torch.matmul((2 / h * Y).T, Xw_h)

for Xw2_h in batch_ctx.hosts.get("Xw2_h"):
loss += 0.125 / h * Xw2_h
loss += 2 / h * Xw2_h
h_loss_list = batch_ctx.hosts.get("h_loss")
for h_loss in h_loss_list:
if h_loss is not None:
Expand Down

0 comments on commit 5830689

Please sign in to comment.