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
wangsen
paddle_dbnet
Commits
d5651dfa
Commit
d5651dfa
authored
Apr 29, 2021
by
Jane-Ding
Committed by
littletomatodonkey
Apr 29, 2021
Browse files
fix win train loader
parent
d63431a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tools/program.py
tools/program.py
+5
-1
No files found.
tools/program.py
View file @
d5651dfa
...
...
@@ -199,8 +199,12 @@ def train(config,
train_reader_cost
=
0.0
batch_sum
=
0
batch_start
=
time
.
time
()
for
idx
,
batch
in
enumerate
(
train_dataloader
()):
max_iter
=
len
(
train_dataloader
)
-
1
if
platform
.
system
(
)
==
"Windows"
else
len
(
train_dataloader
)
for
idx
,
batch
in
enumerate
(
train_dataloader
):
train_reader_cost
+=
time
.
time
()
-
batch_start
if
idx
>=
max_iter
:
break
lr
=
optimizer
.
get_lr
()
images
=
batch
[
0
]
if
use_srn
:
...
...
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