一.teain.py
——5.0 LOSS报错↓
解决错误:RuntimeError: result type Float can‘t be cast to the desired output type __int64_顾悦西的博客-CSDN博客
——module 'signal' has no attribute 'SIGALRM' ↓
Python错误:AttributeError: module 'signal' has no attribute 'SIGALRM'_polyhedronx的博客-CSDN博客
——训练提速>1/3↓
# parser.add_argument('--cache', type=str, nargs='?', const='ram', help='--cache images in "ram" (default) or "disk"')#是否提前缓存图片到内存(原)
parser.add_argument('--cache', action='store_false', help='--cache images in "ram" (default) or "disk"') ###节省1/3时间(修改)
————目录—文件位置↓
val: ../data/datasets/images/val 表示在F:\my\yolo\v5中(下)查找val文件
训练集、验证集、测试集的作用和意义_测试集是什么_AI视觉网奇的博客-CSDN博客
——显存↓
'--batch-size', type=int, default=32 (8g显存,32好像不能再调搞了)
parser.add_argument('--batch-size', type=int, default=32, help='total batch size for all GPUs, -1 for autobatch')
——(各种原因)中断训练↓
开启中断继续训练,应该(没测试)同时需要修改parser.add_argument('--weights', type=str, default=''中断时 【时间最新】的【runs\train\exp4\weights中的】best_yawn.pt或last.pt(*)
parser.add_argument('--resume', nargs='?', const=True, default=False, help='resume most recent training') #原(默认)
# parser.add_argument('--resume', nargs='?', const=True, default=True, help='resume most recent training') #
——提前自动结束训练: 默认100次不更新就停止训练,早停可改30↓
parser.add_argument('--patience', type=int, default=30, help='EarlyStopping patience (epochs without improvement)') ##原 default=100
待:
结果可视化——样本