Commit
·
8db51c7
1
Parent(s):
4052603
tb_writer bug fix
Browse files
train.py
CHANGED
@@ -195,8 +195,9 @@ def train(hyp):
|
|
195 |
c = torch.tensor(labels[:, 0]) # classes
|
196 |
# cf = torch.bincount(c.long(), minlength=nc) + 1.
|
197 |
# model._initialize_biases(cf.to(device))
|
198 |
-
|
199 |
-
|
|
|
200 |
|
201 |
# Check anchors
|
202 |
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
|
|
|
195 |
c = torch.tensor(labels[:, 0]) # classes
|
196 |
# cf = torch.bincount(c.long(), minlength=nc) + 1.
|
197 |
# model._initialize_biases(cf.to(device))
|
198 |
+
if tb_writer:
|
199 |
+
plot_labels(labels)
|
200 |
+
tb_writer.add_histogram('classes', c, 0)
|
201 |
|
202 |
# Check anchors
|
203 |
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
|