PyTorch-YOLOv3
PyTorch-YOLOv3 copied to clipboard
RuntimeError: shape '[2, 3, 6, 11, 11]' is invalid for input of size 3630
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 '[2, 3, 6, 11, 11]' is invalid for input of size 3630
this is my error please,help me
same
Change your configuration file,find yolov3,A total of three
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=15 #change this activation=linear
[yolo] mask = 0,1,2 anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 classes=1 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1
Change your configuration file,find [yolo],A total of three
Here's the part code
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=15 #change this,A total of three,(5+your classes num *6 activation=linear
[yolo] mask = 0,1,2 anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 classes=1 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1
------------------ 原始邮件 ------------------ 发件人: "ischansgithub"<[email protected]>; 发送时间: 2019年12月24日(星期二) 中午1:28 收件人: "eriklindernoren/PyTorch-YOLOv3"<[email protected]>; 抄送: "1342868324"<[email protected]>;"Author"<[email protected]>; 主题: Re: [eriklindernoren/PyTorch-YOLOv3] RuntimeError: shape '[2, 3, 6, 11, 11]' is invalid for input of size 3630 (#378)
same
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Change your configuration file,find [yolo],A total of three Here's the part code ***************************************** [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky [convolutional] size=1 stride=1 pad=1 filters=15 #change this,A total of three,(5+your classes num *6 activation=linear [yolo] mask = 0,1,2 anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 classes=1 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1 ******************* … ------------------ 原始邮件 ------------------ 发件人: "ischansgithub"<[email protected]>; 发送时间: 2019年12月24日(星期二) 中午1:28 收件人: "eriklindernoren/PyTorch-YOLOv3"<[email protected]>; 抄送: "1342868324"<[email protected]>;"Author"<[email protected]>; 主题: Re: [eriklindernoren/PyTorch-YOLOv3] RuntimeError: shape '[2, 3, 6, 11, 11]' is invalid for input of size 3630 (#378) same — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Your answer solved my problem. Thank you!!!!
you're welcome ------------------ 原始邮件 ------------------ 发件人: "ischansgithub"<[email protected]>; 发送时间: 2019年12月24日(星期二) 中午1:56 收件人: "eriklindernoren/PyTorch-YOLOv3"<[email protected]>; 抄送: "1342868324"<[email protected]>;"Author"<[email protected]>; 主题: Re: [eriklindernoren/PyTorch-YOLOv3] RuntimeError: shape '[2, 3, 6, 11, 11]' is invalid for input of size 3630 (#378)
Change your configuration file,find [yolo],A total of three Here's the part code ***************************************** [convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky [convolutional] size=1 stride=1 pad=1 filters=15 #change this,A total of three,(5+your classes num *6 activation=linear [yolo] mask = 0,1,2 anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 classes=1 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1 ******************* … ------------------ 原始邮件 ------------------ 发件人: "ischansgithub"<[email protected]>; 发送时间: 2019年12月24日(星期二) 中午1:28 收件人: "eriklindernoren/PyTorch-YOLOv3"<[email protected]>; 抄送: "1342868324"<[email protected]>;"Author"<[email protected]>; 主题: Re: [eriklindernoren/PyTorch-YOLOv3] RuntimeError: shape '[2, 3, 6, 11, 11]' is invalid for input of size 3630 (#378) same — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Your answer solved my problem. Thank you!!!!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.