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
ColossalAI
Commits
2b49ca80
Commit
2b49ca80
authored
Oct 17, 2022
by
yuxuan-lou
Committed by
Frank Lee
Oct 19, 2022
Browse files
[NFC] polish colossalai/nn/lr_scheduler/linear.py code style (#1716)
parent
f6389d08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
colossalai/nn/lr_scheduler/linear.py
colossalai/nn/lr_scheduler/linear.py
+2
-2
No files found.
colossalai/nn/lr_scheduler/linear.py
View file @
2b49ca80
...
@@ -24,5 +24,5 @@ class LinearWarmupLR(_LRScheduler):
...
@@ -24,5 +24,5 @@ class LinearWarmupLR(_LRScheduler):
if
self
.
last_epoch
<
self
.
warmup_steps
:
if
self
.
last_epoch
<
self
.
warmup_steps
:
return
[(
self
.
last_epoch
+
1
)
/
(
self
.
warmup_steps
+
1
)
*
lr
for
lr
in
self
.
base_lrs
]
return
[(
self
.
last_epoch
+
1
)
/
(
self
.
warmup_steps
+
1
)
*
lr
for
lr
in
self
.
base_lrs
]
else
:
else
:
return
[(
self
.
total_steps
-
self
.
last_epoch
)
/
(
self
.
total_steps
-
self
.
warmup_steps
)
*
lr
for
lr
in
return
[(
self
.
total_steps
-
self
.
last_epoch
)
/
(
self
.
total_steps
-
self
.
warmup_steps
)
*
lr
self
.
base_lrs
]
for
lr
in
self
.
base_lrs
]
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