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

ncnn Batch Norm实现与Caffe不一样? #64

Closed
wasd96040501 opened this issue Jul 29, 2017 · 2 comments
Closed

ncnn Batch Norm实现与Caffe不一样? #64

wasd96040501 opened this issue Jul 29, 2017 · 2 comments

Comments

@wasd96040501
Copy link

请问,ncnn的Batch Norm和Caffe的Batch Norm实现不一样吧?
经过测试对比,我们的网络通过ncnn的Batch Norm之后与Caffe的相比误差很大(差不多有e-1),最终我们的效果也不太好。
请问,针对Batch Norm有后续的更新计划吗?

@nihui
Copy link
Member

nihui commented Aug 1, 2017

用转换器转换batchnorm,应该是一样的才对

@wasd96040501
Copy link
Author

@nihui 问题已经查明了,并不是batch norm的问题。而是convolution层的dilation有一点小错误。
int gap = w * dilation - kernel_extent;
这里有个小错误,应该改为
int gap = w * dilation - dilation * (kernel_size);
已经在3x3卷积dilation为4,16等测试过了,修改之后结果就正确了。

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

2 participants