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
ddbba2b1
Unverified
Commit
ddbba2b1
authored
Mar 16, 2021
by
zhoujun
Committed by
GitHub
Mar 16, 2021
Browse files
Merge pull request #2228 from WenmuZhou/fix_attn_export
fix attn export
parents
f687e092
592c4187
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ppocr/modeling/heads/rec_att_head.py
ppocr/modeling/heads/rec_att_head.py
+1
-1
No files found.
ppocr/modeling/heads/rec_att_head.py
View file @
ddbba2b1
...
@@ -38,7 +38,7 @@ class AttentionHead(nn.Layer):
...
@@ -38,7 +38,7 @@ class AttentionHead(nn.Layer):
return
input_ont_hot
return
input_ont_hot
def
forward
(
self
,
inputs
,
targets
=
None
,
batch_max_length
=
25
):
def
forward
(
self
,
inputs
,
targets
=
None
,
batch_max_length
=
25
):
batch_size
=
inputs
.
shape
[
0
]
batch_size
=
paddle
.
shape
(
inputs
)
[
0
]
num_steps
=
batch_max_length
num_steps
=
batch_max_length
hidden
=
paddle
.
zeros
((
batch_size
,
self
.
hidden_size
))
hidden
=
paddle
.
zeros
((
batch_size
,
self
.
hidden_size
))
...
...
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