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
92841044
Commit
92841044
authored
Aug 12, 2020
by
littletomatodonkey
Browse files
fix error
parent
2918feb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ppocr/data/rec/dataset_traversal.py
ppocr/data/rec/dataset_traversal.py
+5
-3
No files found.
ppocr/data/rec/dataset_traversal.py
View file @
92841044
...
@@ -247,10 +247,12 @@ class SimpleReader(object):
...
@@ -247,10 +247,12 @@ class SimpleReader(object):
print
(
"multiprocess is not fully compatible with Windows."
print
(
"multiprocess is not fully compatible with Windows."
"num_workers will be 1."
)
"num_workers will be 1."
)
self
.
num_workers
=
1
self
.
num_workers
=
1
if
self
.
batch_size
*
get_device_num
()
>
img_num
:
if
self
.
batch_size
*
get_device_num
(
)
*
self
.
num_workers
>
img_num
:
raise
Exception
(
raise
Exception
(
"The number of the whole data ({}) is smaller than the batch_size * devices_num ({})"
.
"The number of the whole data ({}) is smaller than the batch_size * devices_num * num_workers ({})"
.
format
(
img_num
,
self
.
batch_size
*
get_device_num
()))
format
(
img_num
,
self
.
batch_size
*
get_device_num
()
*
self
.
num_workers
))
for
img_id
in
range
(
process_id
,
img_num
,
self
.
num_workers
):
for
img_id
in
range
(
process_id
,
img_num
,
self
.
num_workers
):
label_infor
=
label_infor_list
[
img_id_list
[
img_id
]]
label_infor
=
label_infor_list
[
img_id_list
[
img_id
]]
substr
=
label_infor
.
decode
(
'utf-8'
).
strip
(
"
\n
"
).
split
(
"
\t
"
)
substr
=
label_infor
.
decode
(
'utf-8'
).
strip
(
"
\n
"
).
split
(
"
\t
"
)
...
...
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