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

亲,DCNv2中有些地方不太明白,有人帮忙解答一下吗? #62

Open
liyuyuan6969 opened this issue Sep 14, 2021 · 1 comment

Comments

@liyuyuan6969
Copy link

// DCNv2.cu
for (int ibatch = 0; ibatch < data.num_; ++ibatch) {
		_T* maskWorkspacePtr = (_T*)workspace + (maskSize + im2colSize) * ibatch;
		_T* im2colWorkspacePtr = (_T*)workspace + (maskSize + im2colSize) * ibatch + maskSize;
                 // 比如我这里的input的是(1,128,175175),om是(1,27,88,88),这里的inputMask指向的是om的(1,18,88,88)后面的9个维度的指针吗?那这里的maskSize不是与inputMask的大小不一样吗?maskSize的大小是127*127*3*3,不太懂这里的sigmod,这里的maskSize不是应该是9*88*88来表示吗?
		_T* inputMask = om.ptr<_T>(ibatch, om.channel_ / 3 * 2);
		ExecuteKernel(maskSize, sigmoidKernel, stream)(inputMask, maskWorkspacePtr, maskSize);

		_T* datainput = data.ptr<_T>(ibatch);
		_T* offset = om.ptr<_T>(ibatch);

		ExecuteKernel(im2colSize, DCNIm2colKernel, stream)(
			datainput, offset, maskWorkspacePtr, data.height_, data.width_, kernel_size, kernel_size, 1, 1, 1, 1, 1, 1, data.channel_, data.num_, data.channel_, deformable_group,
			out.height_, out.width_, im2colWorkspacePtr, im2colSize);

@liyuyuan6969
Copy link
Author

我执行这个核函数的时候会出错,暂时不知道是版本原因还是其他原因,但是代码也看不太懂,有没有懂得老哥,推荐一下c++实现DCNv2的博客啥的

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