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
b9d3e8ee
Commit
b9d3e8ee
authored
Feb 04, 2021
by
WenmuZhou
Browse files
add dataset len check
parent
84bf6572
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
tools/program.py
tools/program.py
+5
-0
tools/train.py
tools/train.py
+5
-0
No files found.
tools/program.py
View file @
b9d3e8ee
...
...
@@ -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 @
b9d3e8ee
...
...
@@ -50,6 +50,11 @@ 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'
)
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