-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: shape '[4, 3, 6, 11, 11]' is invalid for input of size 7260 #3
Comments
Could you put a screenshot with error |
Namespace(batch_size=4, checkpoint_interval=1, compute_map=False, data_config='config/custom.data', epochs=100, evaluation_interval=1, gradient_accumulations=2, img_size=416, model_def
|
The input image size should be 32*n, for example 64, 128, 448 etc |
I useing datasets name is DETRAC,image size is 960*540,You mean I change the size of the picture? |
You can try this image size: 960*544. Because of 544/32=17. |
I changed the image size to 960*544, batch_size=2(I only have two pictures in my training folder, try to see if I can run through), but the problem is still this error |
check you yolov3-custom.cfg file
The error is 4*3*6*11*11 not equal 7260
…---Original---
From: "AadeIT"<[email protected]>
Date: 2019/12/14 23:32:38
To: "FLyingLSJ/Computer_Vision_Project"<[email protected]>;
Cc: "Comment"<[email protected]>;"Leong"<[email protected]>;
Subject: Re: [FLyingLSJ/Computer_Vision_Project] RuntimeError: shape '[4, 3, 6, 11, 11]' is invalid for input of size 7260 (#3)
Namespace(batch_size=4, checkpoint_interval=1, compute_map=False, data_config='config/custom.data', epochs=100, evaluation_interval=1, gradient_accumulations=2, img_size=416, model_def
='config/yolov3-custom.cfg', multiscale_training=True, n_cpu=8, pretrained_weights='weights/darknet53.conv.74')
Traceback (most recent call last):
File "train.py", line 107, in
loss, outputs = model(imgs, targets)
File "D:\Anaconda\Anaconda_3\lib\site-packages\torch\nn\modules\module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "D:\pytoch\PyTorch-YOLOv3-master (3)\PyTorch-YOLOv3-master\models.py", line 269, in forward
x, layer_loss = module[0](x, targets, img_dim)
File "D:\Anaconda\Anaconda_3\lib\site-packages\torch\nn\modules\module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "D:\pytoch\PyTorch-YOLOv3-master (3)\PyTorch-YOLOv3-master\models.py", line 153, in forward
x.view(num_samples, self.num_anchors, self.num_classes + 5, grid_size, grid_size)
RuntimeError: shape '[4, 3, 6, 11, 11]' is invalid for input of size 7260
this is my error!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There's no way to think about these parameters, so let me think about it again. Thank you |
Hi,I got the same error,did you solve it? |
@xiaoyuzhu666 try,change your filters of config file |
Thanks,but I have changed it, the error still exist(filters=18,class=1)😭
…---Original---
From: "AadeIT"<[email protected]>
Date: Wed, Apr 1, 2020 16:33 PM
To: "FLyingLSJ/Computer_Vision_Project"<[email protected]>;
Cc: "xiaoyuzhu666"<[email protected]>;"Mention"<[email protected]>;
Subject: Re: [FLyingLSJ/Computer_Vision_Project] RuntimeError: shape '[4, 3, 6, 11, 11]' is invalid for input of size 7260 (#3)
@xiaoyuzhu666 try,change your filters of config file
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@xiaoyuzhu666 [convolutional] [yolo] |
@xiaoyuzhu666 That's how I solved my error |
I don‘t know if it is related to “anchors”: [yolo] |
@xiaoyuzhu666
|
@xiaoyuzhu666 Has nothing to do with the anchor |
I changed “anchors”and “num” using k-means clustering,,,the number of anchor is 3(not 9) |
@xiaoyuzhu666 |
0.0 |
please,help me
The text was updated successfully, but these errors were encountered: