Browse Source

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

modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
c16671fc74
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      models/common.py

+ 5
- 1
models/common.py 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):

Loading…
Cancel
Save