Skip to content

Commit

Permalink
Update pytorch_least_square.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bichengying committed May 10, 2020
1 parent 8412266 commit 1577a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/pytorch_least_square.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def finalize_plot():
alpha = 1e-2
for i in range(maxite):
grad = A.T.mm(A.mm(x_opt) - b) # local gradient
grad = bf.allreduce(grad, name='gradient') # global gradient
grad = bf.allreduce(grad, name='gradient') # global gradient
x_opt = x_opt - alpha*grad

# evaluate the convergence of distributed least-squares
Expand Down

0 comments on commit 1577a68

Please sign in to comment.