updates
This commit is contained in:
parent
9a56d97059
commit
e4cc830690
2
train.py
2
train.py
|
@ -227,7 +227,7 @@ def train(
|
|||
# Calculate mAP (always test final epoch, skip first 5 if opt.nosave)
|
||||
if not (opt.notest or (opt.nosave and epoch < 10)) or epoch == epochs - 1:
|
||||
with torch.no_grad():
|
||||
results, maps = test.test(cfg, data_cfg, batch_size=batch_size*2, img_size=img_size_test, model=model,
|
||||
results, maps = test.test(cfg, data_cfg, batch_size=batch_size * 2, img_size=img_size_test, model=model,
|
||||
conf_thres=0.1)
|
||||
|
||||
# Write epoch results
|
||||
|
|
|
@ -93,10 +93,8 @@ python3 test.py --data ../supermarket2/supermarket2.data --weights ../darknet/ba
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
# Debug/Development
|
||||
python3 train.py --data data/coco.data --img-size 320 --single-scale --batch-size 64 --accumulate 1 --epochs 1 --evolve
|
||||
python3 train.py --data data/coco.data --img-size 320 --single-scale --batch-size 64 --accumulate 1 --epochs 1 --evolve --giou
|
||||
python3 test.py --weights weights/latest.pt --cfg cfg/yolov3-spp.cfg --img-size 320
|
||||
|
||||
gsutil cp evolve.txt gs://ultralytics
|
||||
|
|
|
@ -291,7 +291,7 @@ def compute_loss(p, targets, model, giou_loss=False): # predictions, targets, m
|
|||
# Compute losses
|
||||
if len(b): # number of targets
|
||||
pi = pi0[b, a, gj, gi] # predictions closest to anchors
|
||||
tconf[b, a, gj, gi] = 1 # conf
|
||||
tconf[b, a, gj, gi] = 1.0 # conf
|
||||
# pi[..., 2:4] = torch.sigmoid(pi[..., 2:4]) # wh power loss (uncomment)
|
||||
|
||||
if giou_loss:
|
||||
|
|
Loading…
Reference in New Issue