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
a2fb623f
Unverified
Commit
a2fb623f
authored
Feb 04, 2021
by
zhoujun
Committed by
GitHub
Feb 04, 2021
Browse files
Merge pull request #1938 from WenmuZhou/check_empty_data
add dataset len check
parents
84bf6572
3b1703e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
tools/program.py
tools/program.py
+5
-0
tools/train.py
tools/train.py
+6
-0
No files found.
tools/program.py
View file @
a2fb623f
...
...
@@ -163,6 +163,11 @@ def train(config,
if
type
(
eval_batch_step
)
==
list
and
len
(
eval_batch_step
)
>=
2
:
start_eval_step
=
eval_batch_step
[
0
]
eval_batch_step
=
eval_batch_step
[
1
]
if
len
(
valid_dataloader
)
==
0
:
logger
.
info
(
'No Images in eval dataset, evaluation during training will be disabled'
)
start_eval_step
=
1e111
logger
.
info
(
"During the training process, after the {}th iteration, an evaluation is run every {} iterations"
.
format
(
start_eval_step
,
eval_batch_step
))
...
...
tools/train.py
View file @
a2fb623f
...
...
@@ -50,6 +50,12 @@ def main(config, device, logger, vdl_writer):
# build dataloader
train_dataloader
=
build_dataloader
(
config
,
'Train'
,
device
,
logger
)
if
len
(
train_dataloader
)
==
0
:
logger
.
error
(
'No Images in train dataset, please check annotation file and path in the configuration file'
)
return
if
config
[
'Eval'
]:
valid_dataloader
=
build_dataloader
(
config
,
'Eval'
,
device
,
logger
)
else
:
...
...
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