Skip to content

Commit

Permalink
valid_out (#11126)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyutang authored Oct 25, 2023
1 parent bf59c42 commit 987b311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ppocr/modeling/heads/rec_parseq_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,11 @@ def forward_test(self, memory, max_length=None):
tgt_padding_mask = tgt_padding_mask.cuda().astype(dtype='float32')==1.0
tgt_out = self.decode(tgt_in, memory, tgt_mask, tgt_padding_mask, tgt_query=pos_queries, tgt_query_mask=query_mask[:, :tgt_in.shape[1]])
logits = self.head(tgt_out)

# transfer to probility
logits = F.softmax(logits, axis=-1)

final_output = {"predict":logits}
final_output = {"predict": logits}

return final_output

Expand Down

0 comments on commit 987b311

Please sign in to comment.