-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
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.
Thank you for the great contribution!
I think it is necessary to check req == kWriteTo or kInplace in the forward function.
src/operator/nn/im2col-inl.h
Outdated
Shape3(col_shape[0], col_shape[1], col_shape[2]), s); | ||
|
||
for (index_t n = 0; n < num; ++n) { | ||
im2col(s, im[n].dptr_, im_shape, col_buffer_shape, |
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.
Could we need to check req == kWriteTo or kInplace?
src/operator/nn/im2col-inl.h
Outdated
for (index_t n = 0; n < num; ++n) { | ||
col2im(s, col[n].dptr_, im_shape, col_buffer_shape, | ||
param.kernel, param.pad, param.stride, param.dilate, | ||
im[n].dptr_, kWriteTo); |
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.
Replace kWriteTo with req[0] ?
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.
All fixed. Req types are checked in forward function, too.
d5df50b
to
19c98b6
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.
Great work. LGTM. Thank you : )
Description
This PR exposes im2col and col2im operator using the functions in im2col.h and im2col.cuh.
#10394
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments