[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
|
||||
|
||||
{DOCS}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,17 @@ namespace ops {
|
|||
*
|
||||
* Performs a 2-D convolution operation, include classic 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.
|
||||
* - ksize : the height and width for weight tensor.
|
||||
* - padding : AUTO, VALID or SAME.
|
||||
* - pad : pad value for each spatial axis.
|
||||
* - pad : pad value for each spatial axis.
|
||||
* - stride : stride along each spatial axis.
|
||||
* - dilation : dilation value along each spatial axis of the filter.
|
||||
* - multiplier: function similar to group attribute on other framework,
|
||||
|
|
|
|||
Loading…
Reference in New Issue