Closed guofenggitlearning closed 1 year ago
parser.add_argument('--mode', type=str, default='yolo', help='yolo :[yolov3, yolov4, scaled_yolov4, yolov5, yolor, yolo_combining]' 'yolov7 :[yolov7, ]' 'yolox :[yolox, yolox-lite]' 'yolov6 :[yolov6, ]')
这个参数没太注意,导致loss为0.
train: Scanning '/pgf_api/project_autodriver/ai_model_train/datasets/VOC/labels/train' images and labels...40373 fou train: WARNING: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/images/train/2022_1012_01_dongguan_129.jpg: 1 duplicate labels removed train: WARNING: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/images/train/2022_1012_01_dongguan_310.jpg: 1 duplicate labels removed train: WARNING: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/images/train/2022_1012_01_dongguan_741.jpg: 1 duplicate labels removed train: WARNING: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/images/train/2022_1012_01_dongguan_755.jpg: 1 duplicate labels removed train: New cache created: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/labels/train.cache val: Scanning '/pgf_api/project_autodriver/ai_model_train/datasets/VOC/labels/val' images and labels...102 found, 0 val: New cache created: /pgf_api/project_autodriver/ai_model_train/datasets/VOC/labels/val.cache Plotting labels to runs/train/exp5/labels.jpg... Image sizes 160 train, 160 val Using 0 dataloader workers Logging results to runs/train/exp5 Starting training for 2 epochs...
0%| | 0/20187 [00:00<?, ?it/s]
main(opt)
File "train.py", line 676, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 471, in train
scaler.scale(loss).backward()
AttributeError: 'int' object has no attribute 'backward'
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb: Synced proud-pond-18: https://wandb.ai/panguofeng/YOLOv5/runs/37mwbuxc
wandb: Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: ./wandb/run-20221216_064037-37mwbuxc/logs
Traceback (most recent call last): File "train.py", line 778, in