Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
inikishev authored Dec 25, 2024
1 parent 577cee3 commit f8816a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def closure(backward = True):
loss = loss_fn(preds, targets)

# if you can't call loss.backward() and use gradient-free methods, they always call closure with backward=False.
# so you can remove the part below but keep the unused backward argument.
# so you can remove the part below, but keep the unused backward argument.
if backward:
optimizer.zero_grad()
loss.backward()
Expand Down

0 comments on commit f8816a2

Please sign in to comment.