Add `print(results)` override for PyTorch Hub results (#7559)

pull/7560/head
Glenn Jocher 2022-04-24 12:07:05 -07:00 committed by GitHub
parent be67572279
commit c16671fc74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -683,7 +683,11 @@ class Detections:
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):