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
a8c8f485
Commit
a8c8f485
authored
Apr 07, 2022
by
LDOUBLEV
Browse files
delete debug
parent
22b57e6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
ppocr/modeling/heads/rec_ctc_head.py
ppocr/modeling/heads/rec_ctc_head.py
+0
-2
ppocr/postprocess/rec_postprocess.py
ppocr/postprocess/rec_postprocess.py
+2
-1
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
..._tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
+1
-1
No files found.
ppocr/modeling/heads/rec_ctc_head.py
View file @
a8c8f485
...
...
@@ -80,9 +80,7 @@ class CTCHead(nn.Layer):
result
=
(
x
,
predicts
)
else
:
result
=
predicts
print
(
"self.training: "
,
self
.
training
)
if
not
self
.
training
:
print
(
"self.training, "
,
self
.
training
)
predicts
=
F
.
softmax
(
predicts
,
axis
=
2
)
result
=
predicts
...
...
ppocr/postprocess/rec_postprocess.py
View file @
a8c8f485
...
...
@@ -89,10 +89,11 @@ class CTCLabelDecode(BaseRecLabelDecode):
use_space_char
)
def
__call__
(
self
,
preds
,
label
=
None
,
*
args
,
**
kwargs
):
if
isinstance
(
preds
,
tuple
):
if
isinstance
(
preds
,
tuple
)
or
isinstance
(
preds
,
list
)
:
preds
=
preds
[
-
1
]
if
isinstance
(
preds
,
paddle
.
Tensor
):
preds
=
preds
.
numpy
()
print
(
preds
.
shape
)
preds_idx
=
preds
.
argmax
(
axis
=
2
)
preds_prob
=
preds
.
max
(
axis
=
2
)
text
=
self
.
decode
(
preds_idx
,
preds_prob
,
is_remove_duplicate
=
True
)
...
...
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
View file @
a8c8f485
===========================train_params===========================
model_name:ch_PPOCRv2_rec_PACT
python:python3.7
gpu_list:
6
gpu_list:
0|0,1
Global.use_gpu:True|True
Global.auto_cast:fp32
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=300
...
...
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