Peterisfar / YOLOV3

yolov3 by pytorch
MIT License
196 stars 52 forks source link

About training #9

Closed yehaizi1995 closed 4 years ago

yehaizi1995 commented 4 years ago

I 'm so sorry to bother you again,but i really don't know which place occur this proplem.The erro is:RuntimeError: shape '[512, 256, 3, 3]' is invalid for input of size 408910when i try to run the train.py you show on the README.md.Could you tell me the problem? i just according to your guide and run the train.py

Peterisfar commented 4 years ago

Is your commit newest? And which branch you test?And error information is unclear, could you tell me where dose the error happen?Thanks

yehaizi1995 commented 4 years ago

Is your commit newest? And which branch you test?And error information is unclear, could you tell me where dose the error happen?Thanks Thank you for your reply! According to your RADEME.md file,first,I run this code CUDA_VISIBLE_DEVICES=0 nohup python3 -u train.py --weight_path $WEIGHT_PATH --gpu_id 0 > nohup.log 2>&1 & ,and then i used the nvidia-smito check the process,but nothing processes found;so i decided to run the train.py on pycharm,then the error occur.the error is this :RuntimeError: shape '[512, 256, 3, 3]' is invalid for input of size 408910.so ,could you help me solve this problem? Are you also the student of csu? if so,may be we can contact with each other

Peterisfar commented 4 years ago

Maybe you could paste the image of error information, i want to know where is the error on the code.

dongfengjia20230913 commented 4 years ago

Maybe you could paste the image of error information, i want to know where is the error on the code.

I has the same error: (base) os@os-Super-Server:~/pythorch/PyTorch-YOLOv3-master$ python3 test.py --weights_path weights/yolov3.weights Namespace(batch_size=8, class_path='data/coco.names', conf_thres=0.001, data_config='config/coco.data', img_size=416, iou_thres=0.5, model_def='config/yolov3.cfg', n_cpu=8, nms_thres=0.5, weights_path='weights/yolov3.weights') weights path: weights/yolov3.weights

Traceback (most recent call last): File "test.py", line 85, in model.load_darknet_weights(opt.weights_path) File "/home/os/pythorch/PyTorch-YOLOv3-master/models.py", line 318, in load_darknet_weights conv_w = torch.from_numpy(weights[ptr : ptr + num_w]).view_as(conv_layer.weight) RuntimeError: shape '[512, 256, 3, 3]' is invalid for input of size 408910