This commit is contained in:
Glenn Jocher 2019-05-21 12:58:18 +02:00
parent c2950dbfb6
commit b2abd46437
2 changed files with 2 additions and 1 deletions

View File

@ -174,7 +174,7 @@ def train(
t, t0 = time.time(), time.time()
for epoch in range(start_epoch, epochs):
model.train()
print(('\n%8s%12s' + '%10s' * 7) % ('Epoch', 'Batch', 'xy', 'wh', 'conf', 'cls', 'total', 'nTargets', 'time'))
print(('\n%8s%12s' + '%10s' * 7) % ('Epoch', 'Batch', 'xy', 'wh', 'conf', 'cls', 'total', 'targets', 'time'))
# Update scheduler
scheduler.step()

View File

@ -199,6 +199,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
except:
print('Warning: missing labels for %s' % self.img_files[i])
pass # missing label file
assert len(np.concatenate(self.labels, 0)) > 0, 'No labels found. Check label paths.'
def __len__(self):
return len(self.img_files)