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
bf9f93f7
Commit
bf9f93f7
authored
Jun 10, 2021
by
LDOUBLEV
Browse files
Merge branch 'bm_dyg' of
https://github.com/LDOUBLEV/PaddleOCR
into bm_dyg
parents
ab0b1ace
962a628d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
ppocr/modeling/transforms/tps.py
ppocr/modeling/transforms/tps.py
+1
-3
No files found.
ppocr/modeling/transforms/tps.py
View file @
bf9f93f7
...
...
@@ -231,9 +231,7 @@ class GridGenerator(nn.Layer):
""" Return inv_delta_C which is needed to calculate T """
F
=
self
.
F
hat_eye
=
paddle
.
eye
(
F
,
dtype
=
'float64'
)
# F x F
tmp1
=
C
.
reshape
([
1
,
F
,
2
])
tmp2
=
C
.
reshape
([
F
,
1
,
2
])
hat_C
=
paddle
.
norm
(
tmp1
-
tmp2
,
axis
=
2
)
+
hat_eye
hat_C
=
paddle
.
norm
(
C
.
reshape
([
1
,
F
,
2
])
-
C
.
reshape
([
F
,
1
,
2
]),
axis
=
2
)
+
hat_eye
hat_C
=
(
hat_C
**
2
)
*
paddle
.
log
(
hat_C
)
delta_C
=
paddle
.
concat
(
# F+3 x F+3
[
...
...
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