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
d36a929b
Unverified
Commit
d36a929b
authored
Feb 03, 2021
by
MissPenguin
Committed by
GitHub
Feb 03, 2021
Browse files
Merge pull request #1913 from WenmuZhou/dygraph_rc
fix divide zero error
parents
d9335d2a
dc0a21ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ppocr/metrics/rec_metric.py
ppocr/metrics/rec_metric.py
+1
-1
No files found.
ppocr/metrics/rec_metric.py
View file @
d36a929b
...
...
@@ -29,7 +29,7 @@ class RecMetric(object):
pred
=
pred
.
replace
(
" "
,
""
)
target
=
target
.
replace
(
" "
,
""
)
norm_edit_dis
+=
Levenshtein
.
distance
(
pred
,
target
)
/
max
(
len
(
pred
),
len
(
target
))
len
(
pred
),
len
(
target
)
,
1
)
if
pred
==
target
:
correct_num
+=
1
all_num
+=
1
...
...
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