updates
This commit is contained in:
parent
c2950dbfb6
commit
b2abd46437
2
train.py
2
train.py
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue