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
5e160a5e
Commit
5e160a5e
authored
Jun 30, 2021
by
WenmuZhou
Browse files
add detail error to dataset
parent
ac8c2a89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
ppocr/data/simple_dataset.py
ppocr/data/simple_dataset.py
+3
-1
No files found.
ppocr/data/simple_dataset.py
View file @
5e160a5e
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
import
numpy
as
np
import
numpy
as
np
import
os
import
os
import
random
import
random
import
traceback
from
paddle.io
import
Dataset
from
paddle.io
import
Dataset
from
.imaug
import
transform
,
create_operators
from
.imaug
import
transform
,
create_operators
...
@@ -117,9 +118,10 @@ class SimpleDataSet(Dataset):
...
@@ -117,9 +118,10 @@ class SimpleDataSet(Dataset):
data
[
'ext_data'
]
=
self
.
get_ext_data
()
data
[
'ext_data'
]
=
self
.
get_ext_data
()
outs
=
transform
(
data
,
self
.
ops
)
outs
=
transform
(
data
,
self
.
ops
)
except
Exception
as
e
:
except
Exception
as
e
:
error_meg
=
traceback
.
format_exc
()
self
.
logger
.
error
(
self
.
logger
.
error
(
"When parsing line {}, error happened with msg: {}"
.
format
(
"When parsing line {}, error happened with msg: {}"
.
format
(
data_line
,
e
))
data_line
,
e
rror_meg
))
outs
=
None
outs
=
None
if
outs
is
None
:
if
outs
is
None
:
# during evaluation, we should fix the idx to get same results for many times of evaluation.
# during evaluation, we should fix the idx to get same results for many times of evaluation.
...
...
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