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
ModelZoo
donut_pytorch
Commits
41309734
Commit
41309734
authored
Jul 29, 2022
by
Geewook Kim
Browse files
fix: max_iter with config.max_steps
parent
537cc20e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lightning_module.py
lightning_module.py
+1
-1
No files found.
lightning_module.py
View file @
41309734
...
...
@@ -114,7 +114,7 @@ class DonutModelPLModule(pl.LightningModule):
)
if
self
.
config
.
get
(
"max_steps"
,
None
):
max_iter
=
min
(
self
.
config
.
max_steps
,
max_iter
)
max_iter
=
min
(
self
.
config
.
max_steps
,
max_iter
)
if
max_iter
is
not
None
else
self
.
config
.
max_steps
assert
max_iter
is
not
None
optimizer
=
torch
.
optim
.
Adam
(
self
.
parameters
(),
lr
=
self
.
config
.
lr
)
...
...
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