TypeError: load() missing 1 required positional argument: 'Loader'
Tareq361 opened this issue · comments
When training I got this error:
model_config = yaml.load(open(model_config, 'r'))
TypeError: load() missing 1 required positional argument: 'Loader'
What is the problem @Bobo-y ?
@Tareq361 this code use PyYAML 5.3.1, for PyYaml 6 + , you can write
yaml.load(open(model_config, 'r'), yaml. SafeLoader)
Thanks, man, @Bobo-y
How can I use other versions of yolov5? like yolov5x
Can I use the --weights yolov5x.pt in train.py?
Thanks, man, @Bobo-y How can I use other versions of yolov5? like yolov5x
change version in configs/model_yolo.yal, like yolov5x, set version : x
backbone: type: YOLOv5 version: x # x, m, l ,x with_C3TR: False head: nc: 1 stride: [8.0, 16.0, 32.0] anchors: - [10,13, 16,30, 33,23] # P3/8 - [30,61, 62,45, 59,119] # P4/16 - [116,90, 156,198, 373,326] # P5/32
Thanks, man, @Bobo-y How can I use other versions of yolov5? like yolov5x Can I use the --weights yolov5x.pt in train.py?
for this repo, You cannot directly use the pretrained weights of the ultralytics/yolov5 ,because the parameters name changed, If you must use it, you need to match the parameter name yourself.
Yeah, got it
Thanks, man, @Bobo-y How can I use other versions of yolov5? like yolov5x Can I use the --weights yolov5x.pt in train.py?
for this repo, You cannot directly use the pretrained weights of the ultralytics/yolov5 ,because the parameters name changed, If you must use it, you need to match the parameter name yourself.
Got it, but it's slower than the normal yolov5s training, I am training in google colab.
Yeah, got it
Thanks, man, @Bobo-y How can I use other versions of yolov5? like yolov5x Can I use the --weights yolov5x.pt in train.py?
for this repo, You cannot directly use the pretrained weights of the ultralytics/yolov5 ,because the parameters name changed, If you must use it, you need to match the parameter name yourself.
Got it, but it's slower than the normal yolov5s training, I am training in google colab.
ohh~, i'll check it