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

关于使用DW_Conv2D与Conv2D的移植后使用耗时的问题 #209

Open
panhu opened this issue Dec 8, 2023 · 1 comment
Open

关于使用DW_Conv2D与Conv2D的移植后使用耗时的问题 #209

panhu opened this issue Dec 8, 2023 · 1 comment

Comments

@panhu
Copy link

panhu commented Dec 8, 2023

您好,我在移植后发现在权重很少的情况下,DW_Conv2D的耗时很短但是一旦接上Conv2D后耗时就急剧上升,可能单单DW_Conv2D时是几百微秒,后面接上Conv2D就到了4+毫秒了,权重差异不大都很少,为啥它们会有这么明显的区别?

layer[0] = Input(shape(1, 129, 2), nnom_input_data);
layer[1] = model.hook(DW_Conv2D(1, kernel(2, 5), stride(1, 1), dilation(1, 1), PADDING_SAME, &depthwise_conv2d_w, &depthwise_conv2d_b), layer[0]);
layer[2] = model.hook(Conv2D(32, kernel(1, 1), stride(1, 1), dilation(1, 1), PADDING_SAME, &conv2d_w, &conv2d_b), layer[1]);
@majianjia
Copy link
Owner

DW 计算量远小于 Conv2D(Pointwise)
看MobileNet原文可以发现pointwise占很大一部分的时间

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