-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add 3D convolution transposed operator. #5118
Conversation
6dc08d9
to
e7ff9a7
Compare
e7ff9a7
to
56bbfd1
Compare
1d9cf94
to
51113cf
Compare
be999a9
to
71fa9a8
Compare
71fa9a8
to
5173b8d
Compare
2d8ce70
to
1431f25
Compare
Generally looks good. Is this the C3D model as in http://vlg.cs.dartmouth.edu/c3d/? |
Yes. Conv3D and DeConv3D are needed in video processing or medical image processing. This requirement was put forward by IDL medical image processing team. |
I see. Just had a look and still looks pretty good to me. |
Approved from my side. Maybe Qingqing and Daoyuan could have a double check :) |
paddle/operators/conv_transpose_op.h
Outdated
const int c = output->dims()[1]; // output channels | ||
const int o_d = output->dims()[2]; | ||
const int o_h = output->dims()[3]; | ||
const int o_w = output->dims()[4]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DDim
里存的是int64_t
,如果编译有warning的话,可以用int64_t
类型。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
编译没有warning,不过最好还是改一下
paddle/operators/conv_transpose_op.h
Outdated
|
||
// vol2col: (c * d * h * w, k_d * k_h * k_w) | ||
vol2col(context.device_context(), output_grad_batch, col, strides[0], | ||
strides[1], strides[2], paddings[0], paddings[1], paddings[2]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 396 和 line 431的if分支分开写,导致调用了两次 vol2col,这样多了一次计算。两个分支可以合并。
if ( (!input_grad) && (! filter_grad)) {
return;
}
下面计算~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
5c049b5
to
82aa569
Compare
1e942bc
to
0f1b30e
Compare
047876f
to
5f36177
Compare
5f36177
to
206f32c
Compare
7581b8a
to
acc3278
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
fix #5116