Skip to content

Commit

Permalink
Add print(results) override for PyTorch Hub results (#7559)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Apr 24, 2022
1 parent be67572 commit c16671f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,11 @@ def tolist(self):
return x

def __len__(self):
return self.n
return self.n # override len(results)

def __str__(self):
self.print() # override print(results)
return ''


class Classify(nn.Module):
Expand Down

0 comments on commit c16671f

Please sign in to comment.