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
0968363a
Commit
0968363a
authored
Oct 20, 2020
by
WenmuZhou
Browse files
修复一处注释错误
parent
8edc6f24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ppocr/modeling/architectures/model.py
ppocr/modeling/architectures/model.py
+4
-5
No files found.
ppocr/modeling/architectures/model.py
View file @
0968363a
...
@@ -72,8 +72,7 @@ class Model(nn.Layer):
...
@@ -72,8 +72,7 @@ class Model(nn.Layer):
config
[
'Neck'
][
'in_channels'
]
=
in_channels
config
[
'Neck'
][
'in_channels'
]
=
in_channels
self
.
neck
=
build_neck
(
config
[
'Neck'
])
self
.
neck
=
build_neck
(
config
[
'Neck'
])
in_channels
=
self
.
neck
.
out_channels
in_channels
=
self
.
neck
.
out_channels
# # build head, head is need for det, rec and cls
# # build head, head is need for del, rec and cls
config
[
"Head"
][
'in_channels'
]
=
in_channels
config
[
"Head"
][
'in_channels'
]
=
in_channels
self
.
head
=
build_head
(
config
[
"Head"
])
self
.
head
=
build_head
(
config
[
"Head"
])
...
@@ -94,11 +93,11 @@ def check_static():
...
@@ -94,11 +93,11 @@ def check_static():
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.logging
import
get_logger
from
tools
import
program
from
tools
import
program
config
=
program
.
load_config
(
'configs/rec/rec_
r34_vd_none_bilstm_ctc
.yml'
)
config
=
program
.
load_config
(
'configs/rec/rec_
mv3_none_none_ctc_lmdb
.yml'
)
logger
=
get_logger
()
logger
=
get_logger
()
np
.
random
.
seed
(
0
)
np
.
random
.
seed
(
0
)
data
=
np
.
random
.
rand
(
1
,
3
,
32
,
320
).
astype
(
np
.
float32
)
data
=
np
.
random
.
rand
(
2
,
3
,
64
,
320
).
astype
(
np
.
float32
)
paddle
.
disable_static
()
paddle
.
disable_static
()
config
[
'Architecture'
][
'in_channels'
]
=
3
config
[
'Architecture'
][
'in_channels'
]
=
3
...
@@ -117,7 +116,7 @@ def check_static():
...
@@ -117,7 +116,7 @@ def check_static():
static_out
=
np
.
load
(
static_out
=
np
.
load
(
'/Users/zhoujun20/Desktop/code/PaddleOCR/output/conv.npy'
)
'/Users/zhoujun20/Desktop/code/PaddleOCR/output/conv.npy'
)
diff
=
y
.
numpy
()
-
static_out
diff
=
y
.
reshape
((
-
1
,
6624
)).
numpy
()
-
static_out
print
(
y
.
shape
,
static_out
.
shape
,
diff
.
mean
())
print
(
y
.
shape
,
static_out
.
shape
,
diff
.
mean
())
...
...
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