Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

what does unpack_patch2col exactly do? #39

Closed
DrustZ opened this issue Jul 24, 2015 · 1 comment
Closed

what does unpack_patch2col exactly do? #39

DrustZ opened this issue Jul 24, 2015 · 1 comment

Comments

@DrustZ
Copy link
Contributor

DrustZ commented Jul 24, 2015

I know that this function is to vectorize a matrix to prepare for the convolution,
but in detail, the function receive params (input_image, filter_height, filter_width, stride)
and output a tensor<2>,whose shape is (channel * filter_height * filter_width, batch * ouput_height * output_width)

so I think this function convert the matrix to suit the “dot“ function with filter.

thus , for example , if I input a image tensor ``IMG`` 1 * 2 * 1 * 3, meaning 1 batch, 2 channels, 1 height , 3 width , the first channel of IMG is (1,2,3), the second is (4,5,6), then I apply `` unpack_patch2col(IMG, 1, 2, 1)`` which means the filter is 1 * 2, then the output shoud be like a tensor, (1, 2, 2, 3, 4, 5, 5, 6) but all I get is (6, 2, 6, 2, 6, 2, 6, 2)

Anyone helps me about the function?

@DrustZ
Copy link
Contributor Author

DrustZ commented Jul 24, 2015

My fault, I use %d to show the result which is double...
So the result 1 2 2 3 4 5 5 6 is right.

@DrustZ DrustZ closed this as completed Jul 24, 2015
yajiedesign pushed a commit to yajiedesign/mshadow that referenced this issue Oct 6, 2015
[fix-concurrency-doc] fix outdated doc
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant