Skip to content
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

在使用[shortcut]时from参数为正数时的Bug反馈 #5

Open
ZaoYum-Liao opened this issue Sep 18, 2020 · 0 comments
Open

在使用[shortcut]时from参数为正数时的Bug反馈 #5

ZaoYum-Liao opened this issue Sep 18, 2020 · 0 comments

Comments

@ZaoYum-Liao
Copy link

您好,我在使用densenet201-bifpn.cfg进行训练的时候遇到了一个问题,如下图所示:
image
当from参数为正数时候,会出现通道数不匹配的问题,我在对代码进行查阅时候发现shortcut层转换代码如下所示:
image
当shortcut层选择204层和shortcut层的上一层进行相加时,其输出通道数目filters = output_filters[int(mdef['from'])]应该等于第204层的输出通道数目,其输出应该是一个等于512的通道数,其中204层的详细配置如下图所示:
image
然而由于output_filters在初始化的时候将图像的3通道作为列表的第一个值,就会出现层数和cfg文件不匹配的情况,比如在cfg文件的第y个shortcut层选择第0层进行相加,此时的第0层应该是cfg文件中的第0层的输出,在cfg/densenet201-bifpn.cfg中就是如下图所示:
image
然而此时我们的filters = output_filters[int(mdef['from'])]输出的确实3....
语言有点混乱,不知是否理解。我对代码进行更改,更改如下图所示:
image
亲测改完之后训练就没有问题了.....因为yolov3.cfg文件中shortcut层的from值都是负数,所以这个bug在测试from值全是负数的时候是没有问题的....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant