【问题标题】:How to resolve an error in Yolov5 train,py in yaml如何解决 Yolov5 train,py in yaml 中的错误
【发布时间】:2021-05-15 08:46:32
【问题描述】:

我正在尝试在 Google colab GPU 免费版中运行 yolov5

!pip install PyYAML==5.3

我遇到了一个错误

Model Summary: 407 layers, 8.84875e+07 parameters, 8.84875e+07 gradients
    Optimizer groups: 134 .bias, 142 conv.weight, 131 other
    Traceback (most recent call last):
      File "/content/yolov5/train.py", line 116, in train
       ckpt['model'] = {k: v for k, v in ckpt['model'].float().state_dict().items()
      File "/content/yolov5/train.py", line 117, in <dictcomp>
        if model.state_dict()[k].shape == v.shape}  # to FP32, filter
    KeyError: 'model.18.conv.weight'

我在 google colab 中的命令是

!python /content/yolov5/train.py --img 640 --batch 4 --epochs 30 \
  --data /content/yolov5/data/clothing.yaml
  --cfg /content/yolov5/models/yolov5x.yaml \
  --weights yolov5x.pt \
  --name yolov5_clothing --cache

你能帮我解决这个问题吗?

谢谢

【问题讨论】:

    标签: python-3.x yolov5


    【解决方案1】:

    yolo 团队已解决此问题,要求我运行 requirements.txt 并重新下载 yolo。

    一切都很好,你可以在https://github.com/ultralytics/yolov5/issues/2181看到更多细节

    谢谢

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-09
      • 1970-01-01
      • 1970-01-01
      • 2023-02-12
      • 1970-01-01
      • 2022-08-14
      相关资源
      最近更新 更多