We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当add两个输入是[197, 768] 和 [1, 197, 768]的时候(N,C,H,W),使用广播机制,输出是【197, 768, 768】 而我需要的正确结果是[1, 197, 768]
请教一下,是不是二维与三维的广播出现了问题, 能否将 B2 = B.reshape(1, B.w, B.h, opt.workspace_allocator); 修改为 B2 = B.reshape(B.w, B.h, 1, opt.workspace_allocator);
@nihui 非常感谢
The text was updated successfully, but these errors were encountered:
https://github.com/Tencent/ncnn/wiki/binaryop-broadcasting
支持的广播规则并没有这种情况?
Sorry, something went wrong.
感谢解答,意思是不支持这种情况吗?但是这应该属于常见情况吧,我修改成B2 = B.reshape(B.w, B.h, 1, opt.workspace_allocator);输出shape就对了。 为啥不按这种做个判断啊? if (outdims == 3 && A.dims == 1) { if (A.w == B.c) A2 = A.reshape(1, 1, A.w); else // if (A.w == B.w) A2 = A.reshape(A.w, 1, 1); } @nihui
No branches or pull requests
当add两个输入是[197, 768] 和 [1, 197, 768]的时候(N,C,H,W),使用广播机制,输出是【197, 768, 768】
而我需要的正确结果是[1, 197, 768]
请教一下,是不是二维与三维的广播出现了问题,
能否将
B2 = B.reshape(1, B.w, B.h, opt.workspace_allocator);
修改为
B2 = B.reshape(B.w, B.h, 1, opt.workspace_allocator);
@nihui
非常感谢
The text was updated successfully, but these errors were encountered: