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
31aa45fe
"...git@developer.sourcefind.cn:chenpangpang/diffusers.git" did not exist on "dc6324d44bc189a0bf63018145617a736e7a38ff"
Commit
31aa45fe
authored
Dec 25, 2020
by
WenmuZhou
Browse files
add init to fc1
parent
7a94905a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
ppocr/modeling/transforms/tps.py
ppocr/modeling/transforms/tps.py
+5
-1
No files found.
ppocr/modeling/transforms/tps.py
View file @
31aa45fe
...
@@ -16,6 +16,7 @@ from __future__ import absolute_import
...
@@ -16,6 +16,7 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
division
from
__future__
import
print_function
from
__future__
import
print_function
import
math
import
paddle
import
paddle
from
paddle
import
nn
,
ParamAttr
from
paddle
import
nn
,
ParamAttr
from
paddle.nn
import
functional
as
F
from
paddle.nn
import
functional
as
F
...
@@ -88,11 +89,14 @@ class LocalizationNetwork(nn.Layer):
...
@@ -88,11 +89,14 @@ class LocalizationNetwork(nn.Layer):
in_channels
=
num_filters
in_channels
=
num_filters
self
.
block_list
.
append
(
pool
)
self
.
block_list
.
append
(
pool
)
name
=
"loc_fc1"
name
=
"loc_fc1"
stdv
=
1.0
/
math
.
sqrt
(
num_filters_list
[
-
1
]
*
1.0
)
self
.
fc1
=
nn
.
Linear
(
self
.
fc1
=
nn
.
Linear
(
in_channels
,
in_channels
,
fc_dim
,
fc_dim
,
weight_attr
=
ParamAttr
(
weight_attr
=
ParamAttr
(
learning_rate
=
loc_lr
,
name
=
name
+
"_w"
),
learning_rate
=
loc_lr
,
name
=
name
+
"_w"
,
initializer
=
nn
.
initializer
.
Uniform
(
-
stdv
,
stdv
)),
bias_attr
=
ParamAttr
(
name
=
name
+
'.b_0'
),
bias_attr
=
ParamAttr
(
name
=
name
+
'.b_0'
),
name
=
name
)
name
=
name
)
...
...
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