Open Jayku88 opened 5 months ago
这个错误显示,学习率不满足条件">=0"。这个是因为已经超过训练的epoch。如果您想继续训练,请更改配置文件中的最大训练次数。在https://github.com/wycloveinfall/MSMDFF-NET/blob/main/cfg_file/general_cfg.py的161行 TRAIN_SETTING = { "runType": 'Train', "TRAIN_IMG_SIZE": image_size, # 输入图片的大小 "DATA_TYPE":DATA_TYPE[DATA_TYPE_flage], "CLASS_NUM": 1, "MODEL_TYPE": _MODEL_SELECT[MODEL_SELECT_flag], "BATCH_SIZE": batch_size, # 每次训练输入的batch大小 "TRAIN_PIN_MEMOR": True, "IOU_THRESHOLD_LOSS": 0.5, # 分割的IOU阈值 "EPOCHS": 200, # 总的训练批次 "NUMBER_WORKERS": NUMBER_WORKERS, # dataloader 使用的线程数
# 物理变化
"MULTI_SCALE_TRAIN": True, # 不同分辨率图像混合训练,动态的分辨率训练
"ROTATE": [0,30,60,120,150],
"hsv_T":True,
"shuffle":SHUFFLE,
}
所以。我必须减少纪元数 ?
如果你想训练更多的批次,你可以增加“epoch'”
While running the code I am getting following error ---------- Epoch:200 ---------- 0%| | 0/166 [00:00<?, ?it/s] =>Epoches 200, learning rate = -0.00000000 0%| | 0/166 [00:03<?, ?it/s] Traceback (most recent call last): File "train.py", line 277, in
batch_loss_n, pred = solver.optimize(index+1,epoch)
File "/home/jayakumar/MSMDFF-NET-main/utils/frame_work_general.py", line 113, in optimize
self.lr_current = self.scheduler(self.optimizer, i, epoch,debuge=False)
File "/home/jayakumar/MSMDFF-NET-main/utils/learnlingrate_methods/lr_scheduler.py", line 61, in call
assert lr >= 0
AssertionError
Aborted (core dumped)