Skip to content

Conversation

@hedaoyuan
Copy link
Contributor

@hedaoyuan hedaoyuan commented Jun 12, 2017

Fix #2424. Need pr #2282 .

number old code new code about
1 BlockExpandLayer ImageExpand, ImageExpandGrad, BlockExpandLayer Use the ImageExpand and ImageExpandGrad function to refactor the code of BlockExpandLayer.
2 Im2ColFunctor, Col2ImFunctor in pr #2282 Im2ColFunctor, Col2ImFunctor Use the TensorShape to refactor the arguments of the Im2ColFunctor and Col2ImFunctor interfaces. And add ColFormat kOCF.
3 Unit test of Im2ColFunctor, Col2ImFunctor The transposition of the result of ColFormat==kCFO is equal to the result of ColFormat==kOCF.
4 Remove Matrix::convExpand and Matrix::convShrink after pr #2282
@hedaoyuan hedaoyuan requested a review from qingqing01 June 12, 2017 13:24
namespace paddle {

/* The storage format of the coldata in the Im2ColFunctor and Col2ImFunctor. */
enum ColFormat { kCFO = 0, kOCF = 1 };
Copy link
Contributor

@qingqing01 qingqing01 Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两种格式在Layer里都用嘛? 我印象中只用了一种吧。 有两种的话,会导致weight是转置关系吗?

C: input channel
F: filter
O: output channel

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kCFO是用在GemmConvFunction卷积计算中的kOCF是用在这个PR的BlockExpandFunction中的,原先BlockExpandLayer中是用的kCFO这种方式,不过计算完了,还需要再做一次转置才行。

@qingqing01
Copy link
Contributor

Almost LGTM.

@hedaoyuan hedaoyuan merged commit 1ab2e44 into PaddlePaddle:develop Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants