Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
fairscale
Commits
1ae77784
Unverified
Commit
1ae77784
authored
May 05, 2021
by
anj-s
Committed by
GitHub
May 05, 2021
Browse files
[fix][adascale] Fix infinite loop in docstring (#656)
* fix infinite loop in docstring * fix docstring
parent
69cbdf5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fairscale/optim/adascale.py
fairscale/optim/adascale.py
+2
-2
No files found.
fairscale/optim/adascale.py
View file @
1ae77784
...
@@ -74,7 +74,7 @@ class AdaScale(Optimizer):
...
@@ -74,7 +74,7 @@ class AdaScale(Optimizer):
last_epoch = 0
last_epoch = 0
done = False
done = False
step = 0
step = 0
while
Tru
e:
while
not don
e:
for batch in dataset:
for batch in dataset:
optim.zero_grad()
optim.zero_grad()
logits = model()
logits = model()
...
@@ -86,7 +86,7 @@ class AdaScale(Optimizer):
...
@@ -86,7 +86,7 @@ class AdaScale(Optimizer):
if epoch > last_epoch:
if epoch > last_epoch:
scheduler.step()
scheduler.step()
last_epoch = epoch
last_epoch = epoch
if epoch >=
max_epochs
:
if epoch >=
MAX_EPOCHS
:
done = True
done = True
Example 2: using a custom `update_lr()` function that update the learning
Example 2: using a custom `update_lr()` function that update the learning
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment