Skip to content

Commit

Permalink
fix aster loss for axis (PaddlePaddle#8675)
Browse files Browse the repository at this point in the history
  • Loading branch information
tink2123 authored Dec 20, 2022
1 parent 582e868 commit ca8de0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppocr/losses/rec_aster_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, margin=0.):

def forward(self, x1, x2, target):
similarity = paddle.sum(
x1 * x2, dim=-1) / (paddle.norm(
x1 * x2, axis=-1) / (paddle.norm(
x1, axis=-1) * paddle.norm(
x2, axis=-1) + self.epsilon)
one_list = paddle.full_like(target, fill_value=1)
Expand Down

0 comments on commit ca8de0c

Please sign in to comment.