[NNRT-1111] add memory layout for doc
This commit is contained in:
parent
26948d6646
commit
ebad62ab02
|
|
@ -1,3 +1,23 @@
|
||||||
|
# Memory Layout
|
||||||
|
|
||||||
|
There are two different memory layout mode:
|
||||||
|
|
||||||
|
- Row-Major. Also called C contiguous, which is firstly introduced in C by AT&T Bell Lab(1960s). Caffe/TensorFlow/Pytorch follow the Row-Major layout mode.
|
||||||
|
|
||||||
|
- Column-Major. Also called Fortran contiguous, which is firstly introduced in Fortran by IBM(1958). Matlab/OpenGL/OpenCL/OpenVX follow the Column-Major layout mode.
|
||||||
|
|
||||||
|
See also :
|
||||||
|
|
||||||
|
http://eigen.tuxfamily.org/dox/group__TopicStorageOrders.html
|
||||||
|
|
||||||
|
On the other hand, a memory layout can be described by both Row-Major and Column-Major mode.
|
||||||
|
|
||||||
|
It easily tranlate the layout mode from one to another: just reverse the dimesions of the tensor.
|
||||||
|
|
||||||
|
For example, TensorFlow usually describe the tensor as NHWC format. This is equal the CWHN format in OpenVX.
|
||||||
|
|
||||||
|
Likewise, the WHCN format in OpenVX is equal the NCHW format in Caffe.
|
||||||
|
|
||||||
# Operators
|
# Operators
|
||||||
|
|
||||||
{DOCS}
|
{DOCS}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,12 @@ namespace ops {
|
||||||
* Performs a 2-D convolution operation, include classic Conv2D /
|
* Performs a 2-D convolution operation, include classic Conv2D /
|
||||||
* Depthwise Conv2D / Group Conv2D / Dilation Conv2D.
|
* Depthwise Conv2D / Group Conv2D / Dilation Conv2D.
|
||||||
*
|
*
|
||||||
|
* Input:
|
||||||
|
* - input [WHCN or CWHN].
|
||||||
|
* - kernel [ WHIcOc ] (Ic: Input Channels. Oc: Output Channels).
|
||||||
|
* - bias [ O ]. Optional.
|
||||||
|
*
|
||||||
|
* Attribute:
|
||||||
* - weights : the output channel number for weight tensor.
|
* - weights : the output channel number for weight tensor.
|
||||||
* - ksize : the height and width for weight tensor.
|
* - ksize : the height and width for weight tensor.
|
||||||
* - padding : AUTO, VALID or SAME.
|
* - padding : AUTO, VALID or SAME.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue