updates
This commit is contained in:
parent
ab141fcc1f
commit
1e62ee2152
4
train.py
4
train.py
|
@ -128,7 +128,7 @@ def train(
|
||||||
# plt.savefig('LR.png', dpi=300)
|
# plt.savefig('LR.png', dpi=300)
|
||||||
|
|
||||||
# Dataset
|
# Dataset
|
||||||
rectangular_training = False
|
rectangular_training = True
|
||||||
dataset = LoadImagesAndLabels(train_path,
|
dataset = LoadImagesAndLabels(train_path,
|
||||||
img_size,
|
img_size,
|
||||||
batch_size,
|
batch_size,
|
||||||
|
@ -196,7 +196,7 @@ def train(
|
||||||
imgs = imgs.to(device)
|
imgs = imgs.to(device)
|
||||||
targets = targets.to(device)
|
targets = targets.to(device)
|
||||||
|
|
||||||
# Multi-Scale training
|
# Multi-Scale training TODO: short-side to 32-multiple https://github.com/ultralytics/yolov3/issues/358
|
||||||
if multi_scale:
|
if multi_scale:
|
||||||
if (i + nb * epoch) / accumulate % 10 == 0: # adjust (67% - 150%) every 10 batches
|
if (i + nb * epoch) / accumulate % 10 == 0: # adjust (67% - 150%) every 10 batches
|
||||||
img_size = random.choice(range(img_size_min, img_size_max + 1)) * 32
|
img_size = random.choice(range(img_size_min, img_size_max + 1)) * 32
|
||||||
|
|
Loading…
Reference in New Issue