Open abdelhak51 opened 2 years ago
please use best.pt, init.pt only contains initial weights, it can not be used for testing.
but I had only init.pt that was generated why?
maybe when training the model i used this command python train.py --batch-size 8 --img 1280 1280 --data coco.yaml --cfg cfg/yolor_p6.cfg --weights 'yolor_p6.pt' --device 0 --name yolor_p6 --hyp hyp.scratch.1280.yaml --epochs 300
wherein this training command I used the --weights attribute with yolor_p6.pt
do u finish 300 epochs training? init.pt is saved before start training, maybe your training is not correctly start.
I trained a new model using yolor but when using the new .pt file it is not working and show me this error :
the error is : File "detect.py", line 45, in detect model.load_state_dict(torch.load(weights[0], map_location=device)['model']) TypeError: 'Darknet' object is not subscriptable
so I don't know how to fix this problem and why it is showing this.