2

I am trying to run yolov5 in Google colab GPU free version

!pip install PyYAML==5.3

I am getting an error

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'

My command in google colab is

!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

Can you please help me to resolve this ?

Thanks

Maurice
  • 11,482
  • 2
  • 25
  • 45
parag
  • 51
  • 4

1 Answers1

1

This issue has been resolved by yolo team asked me to run requirements.txt and download yolo again.

Everything is fine you can see the more details on https://github.com/ultralytics/yolov5/issues/2181

Thanks

parag
  • 51
  • 4