Skip to content

Commit

Permalink
unify to pt
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Oct 12, 2023
1 parent bc46f3a commit 3dd8580
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion doctr/models/recognition/master/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def call(
output = self.decoder(gt, encoded, source_mask, target_mask, **kwargs)
logits = self.linear(output, **kwargs)
else:
logits = _bf16_to_numpy_dtype(self.decode(encoded, **kwargs))
logits = self.decode(encoded, **kwargs)

logits = _bf16_to_numpy_dtype(logits)

if self.exportable:
out["logits"] = logits
Expand Down
4 changes: 3 additions & 1 deletion doctr/models/recognition/parseq/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ def call(
)
)
else:
logits = _bf16_to_numpy_dtype(self.decode_autoregressive(features, **kwargs))
logits = self.decode_autoregressive(features, **kwargs)

logits = _bf16_to_numpy_dtype(logits)

out: Dict[str, tf.Tensor] = {}
if self.exportable:
Expand Down

0 comments on commit 3dd8580

Please sign in to comment.