Open ghm666 opened 3 years ago
error message : darknet: ./src/parser.c:984: parse_shortcut: Assertion `params.w == net.layers[index].out_w && params.h == net.layers[index].out_h' failed.
This error is normally caused when you don't update the filters=...
line prior to the [yolo]
layers.
But I see there are several issues open with similar problems:
These ones seems to have a possible solutions:
Linking in more:
Also see this in issue #3363 about resnet152_trident: https://github.com/AlexeyAB/darknet/issues/3363#issuecomment-503980943
Ther is a bug with ResNet models (bug with residual connections between layers with different resolution). I will try to resolve it when I have time.
Ther is a bug with ResNet models (bug with residual connections between layers with different resolution). I will try to resolve it when I have time.
Thank you for your reply and look forward to fixing this bug soon.
@AlexeyAB Could you please share your thoughts on possible ways to resolve this bug? Someone else may take the lead on this.
error message : darknet: ./src/parser.c:984: parse_shortcut: Assertion `params.w == net.layers[index].out_w && params.h == net.layers[index].out_h' failed.
@AlexeyAB How can I solve this problem?
This error still occurs when I use resnet50.
resnet18-yolov3.cfg
` [convolutional] batch_normalize=1 filters=64 size=7 stride=2 pad=1 activation=leaky
[maxpool] size=2 stride=2
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=64 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=128 size=3 stride=2 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=256 size=3 stride=2 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=512 size=3 stride=2 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=3 stride=1 pad=1 activation=linear
[shortcut] activation=leaky from=-3
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] batch_normalize=1 filters=512 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=1024 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=27 activation=linear
[yolo] mask = 6,7,8 anchors = 18,27, 24,65, 67,47, 38,142, 92,112, 217, 69, 101,253, 245,161, 298,311 classes=4 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1
[route] layers = -4
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[upsample] stride=2
[route] layers = -1, 19
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=512 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=512 activation=leaky
[convolutional] batch_normalize=1 filters=256 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=512 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=27 activation=linear
[yolo] mask = 3,4,5 anchors = 18,27, 24,65, 67,47, 38,142, 92,112, 217, 69, 101,253, 245,161, 298,311 classes=4 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1
[route] layers = -4
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[upsample] stride=2
[route] layers = -1, 13
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky
[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky
[convolutional] batch_normalize=1 size=3 stride=1 pad=1 filters=256 activation=leaky
[convolutional] size=1 stride=1 pad=1 filters=27 activation=linear
[yolo] mask = 0,1,2 anchors = 18,27, 24,65, 67,47, 38,142, 92,112, 217, 69, 101,253, 245,161, 298,311 classes=4 num=9 jitter=.3 ignore_thresh = .7 truth_thresh = 1 random=1`