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
297871d4
Commit
297871d4
authored
Dec 30, 2020
by
tink2123
Browse files
fix bugs
parent
c1fd4664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
ppocr/metrics/__init__.py
ppocr/metrics/__init__.py
+0
-1
tools/program.py
tools/program.py
+2
-3
No files found.
ppocr/metrics/__init__.py
View file @
297871d4
...
...
@@ -26,7 +26,6 @@ def build_metric(config):
from
.det_metric
import
DetMetric
from
.rec_metric
import
RecMetric
from
.cls_metric
import
ClsMetric
from
.rec_metric
import
RecMetric
support_dict
=
[
'DetMetric'
,
'RecMetric'
,
'ClsMetric'
]
...
...
tools/program.py
View file @
297871d4
...
...
@@ -179,9 +179,9 @@ def train(config,
if
'start_epoch'
in
best_model_dict
:
start_epoch
=
best_model_dict
[
'start_epoch'
]
else
:
start_epoch
=
0
start_epoch
=
1
for
epoch
in
range
(
start_epoch
,
epoch_num
):
for
epoch
in
range
(
start_epoch
,
epoch_num
+
1
):
if
epoch
>
0
:
train_dataloader
=
build_dataloader
(
config
,
'Train'
,
device
,
logger
)
train_batch_cost
=
0.0
...
...
@@ -216,7 +216,6 @@ def train(config,
stats
[
'lr'
]
=
lr
train_stats
.
update
(
stats
)
#cal_metric_during_train = False
if
cal_metric_during_train
:
# onlt rec and cls need
batch
=
[
item
.
numpy
()
for
item
in
batch
]
post_result
=
post_process_class
(
preds
,
batch
[
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