|

楼主 |
发表于 2024-7-9 16:03:51
|
显示全部楼层
yolov5训练出现以下错误
train: WARNING: Cache directory C:\Users\shiro\Desktop is not writeable: [WinError 183] 当文件已存在时,无法创建该文件。: 'C:\\Users\\shiro\\Desktop\\1111.cache.npy' -> 'C:\\Users\\shiro\\Desktop\\1111.cache'
val: Scanning 'C:\Users\shiro\Desktop\2222.cache' images and labels... 16 found, 0 missing, 0 empty, 0 corrupted: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:00<?, ?it/s]
module 'signal' has no attribute 'SIGALRM'
AutoAnchor: 4.90 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset
Image sizes 640 train, 640 val
Using 0 dataloader workers
Logging results to runs\train\exp14
Starting training for 100 epochs...
Epoch gpu_mem box obj cls labels img_size
0%| | 0/18 [00:01<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 630, in <module>
main(opt)
File "train.py", line 524, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 319, in train
loss, loss_items = compute_loss(pred, targets.to(device)) # loss scaled by batch_size
File "C:\Users\shiro\Desktop\yolov5-mask-42-master\utils\loss.py", line 120, in __call__
tcls, tbox, indices, anchors = self.build_targets(p, targets) # targets
File "C:\Users\shiro\Desktop\yolov5-mask-42-master\utils\loss.py", line 217, in build_targets
indices.append((b, a, gj.clamp_(0, gain[3] - 1), gi.clamp_(0, gain[2] - 1))) # image, anchor, grid indices
RuntimeError: result type Float can't be cast to the desired output type __int64
|
|