Skip to content

Commit

Permalink
fixed minor type conversion from onnx
Browse files Browse the repository at this point in the history
When checking the type of output was causing some noisy output in the logs. Corrected the method for checking the type
  • Loading branch information
ryanchesler authored Jan 20, 2023
1 parent 73ab837 commit ef5456e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/recognition/predictor/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def forward(
batch = batch.to(self.device)
# batch = batch.half()
char_logits = self.model(batch)
if type(char_logits) != torch.Tensor():
if not torch.is_tensor(char_logits):
char_logits = torch.tensor(char_logits)
raw += [self.postprocessor(char_logits)]

Expand Down

0 comments on commit ef5456e

Please sign in to comment.