Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tensor.shape bug not paddle.shape(tensor) #11919

Merged
merged 3 commits into from
Apr 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refine
  • Loading branch information
wanghuancoder committed Apr 16, 2024
commit 05e242deb005ead004510af0e5c573083bb8f38f
2 changes: 1 addition & 1 deletion ppocr/modeling/heads/rec_sar_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _2d_attention(self,
# bsz * (seq_len + 1) * h * w * attn_size
attn_weight = self.conv1x1_2(attn_weight)
# bsz * (seq_len + 1) * h * w * 1
bsz, T, h, w, c = attn_weight.shape
bsz, T, h, w, c = paddle.shape(attn_weight)
assert c == 1

if valid_ratios is not None:
Expand Down