Skip to content

Commit

Permalink
fix cls type
Browse files Browse the repository at this point in the history
  • Loading branch information
littletomatodonkey committed Aug 17, 2021
1 parent a81b88a commit 66c3294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppocr/losses/cls_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ def __init__(self, **kwargs):
self.loss_func = nn.CrossEntropyLoss(reduction='mean')

def forward(self, predicts, batch):
label = batch[1]
label = batch[1].astype("int64")
loss = self.loss_func(input=predicts, label=label)
return {'loss': loss}

0 comments on commit 66c3294

Please sign in to comment.