diff --git a/master/doctrees/environment.pickle b/master/doctrees/environment.pickle index 2cd14200..7359460d 100644 Binary files a/master/doctrees/environment.pickle and b/master/doctrees/environment.pickle differ diff --git a/master/doctrees/functionlib/dsplib/batch_to_space.doctree b/master/doctrees/functionlib/dsplib/batch_to_space.doctree new file mode 100644 index 00000000..b371309d Binary files /dev/null and b/master/doctrees/functionlib/dsplib/batch_to_space.doctree differ diff --git a/master/doctrees/functionlib/dsplib/batchtospace.doctree b/master/doctrees/functionlib/dsplib/batchtospace.doctree deleted file mode 100644 index 2db792d7..00000000 Binary files a/master/doctrees/functionlib/dsplib/batchtospace.doctree and /dev/null differ diff --git a/master/doctrees/functionlib/dsplib/dsplib_index.doctree b/master/doctrees/functionlib/dsplib/dsplib_index.doctree index 130a8419..650107a0 100644 Binary files a/master/doctrees/functionlib/dsplib/dsplib_index.doctree and b/master/doctrees/functionlib/dsplib/dsplib_index.doctree differ diff --git a/master/html/_sources/functionlib/dsplib/batch_to_space.rst.txt b/master/html/_sources/functionlib/dsplib/batch_to_space.rst.txt new file mode 100644 index 00000000..35e55520 --- /dev/null +++ b/master/html/_sources/functionlib/dsplib/batch_to_space.rst.txt @@ -0,0 +1,96 @@ +BatchToSpace +================= +将输入张量在批维度上分块并重新分布到空间维度,同时按照 ``crops`` 对输出空间范围进行裁剪。 + + .. math:: + + \begin{aligned} + N_{\text{out}} &= \frac{N}{b_h \times b_w}, \\ + H_{\text{out}} &= b_h \times H - c_{\text{top}} - c_{\text{bottom}}, \\ + W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\ + ext{output}[n, h, w, c] &= \text{input}[n', h', w', c] + \end{aligned} + + 其中 :math:`N, H, W, C` 分别表示输入的 batch、高度、宽度和通道数;:math:`b_h, b_w` 为 ``block_size``;:math:`c_{*}` 来源于 ``crops``;:math:`n', h', w'` 由 ``BatchToSpace`` 映射关系确定。 + + 输入: + - **input** - 输入数据地址。 + - **in_shape** - 输入形状,格式为 ``[batch, height, width, channel]``。 + - **block_size** - 分块因子,格式为 ``[block_h, block_w]``。 + - **crops** - 裁剪参数,格式为 ``[top, bottom, left, right]``。 + - **core_mask(int, 可选)** - 核掩码(仅适用于共享存储版本)。 + + 输出: + - **output** - 输出数据地址。 + + 支持平台: + ``FT78NE`` + ``MT7004`` + + .. note:: + - FT78NE 支持 fp32、fp64、cplx64、cplx128、int16、int8、int32 数据类型。 + - MT7004 支持 fp32、fp16、cplx64、int16、int32 数据类型。 + + +**共享存储版本:** + +.. c:function:: void i8_batch_to_space_s(const int8_t *input, int8_t *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void i16_batch_to_space_s(const int16_t *input, int16_t *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void i32_batch_to_space_s(const int *input, int *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void hp_batch_to_space_s(const half *input, half *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void fp_batch_to_space_s(const float *input, float *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void dp_batch_to_space_s(const double *input, double *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void c64_batch_to_space_s(const float *input, float *output, const int *in_shape, const int *block, const int *crops, int core_mask) +.. c:function:: void c128_batch_to_space_s(const double *input, double *output, const int *in_shape, const int *block, const int *crops, int core_mask) + + + **C 调用示例:** + + .. code-block:: c + :linenos: + :emphasize-lines: 11 + + // 多核(共享存储)示例 + #include + + int main(int argc, char *argv[]) { + float *input = (float *)0xA0000000; // 输入在 DDR 空间 + float *output = (float *)0xB0000000; + int input_shape[4] = {400, 2, 2, 3}; + int block_size[2] = {2, 2}; + int crops[4] = {0, 0, 0, 0}; + int core_mask = 0xff; + fp_batch_to_space_s(input, output, input_shape, block_size, crops, core_mask); + return 0; + } + + +**私有存储版本:** + +.. c:function:: void i8_batch_to_space_p(const int8_t *input, int8_t *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void i16_batch_to_space_p(const int16_t *input, int16_t *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void i32_batch_to_space_p(const int *input, int *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void hp_batch_to_space_p(const half *input, half *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void fp_batch_to_space_p(const float *input, float *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void dp_batch_to_space_p(const double *input, double *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void c64_batch_to_space_p(const float *input, float *output, const int *in_shape, const int *block, const int *crops) +.. c:function:: void c128_batch_to_space_p(const double *input, double *output, const int *in_shape, const int *block, const int *crops) + + **C 调用示例:** + + .. code-block:: c + :linenos: + :emphasize-lines: 10 + + // 单核(私有存储)示例 + #include + + int main(int argc, char *argv[]) { + float *input = (float *)0x10000000; // 输入在 L2 空间 + float *output = (float *)0x10010000; + int input_shape[4] = {400, 2, 2, 3}; + int block_size[2] = {2, 2}; + int crops[4] = {0, 0, 0, 0}; + fp_batch_to_space_p(input, output, input_shape, block_size, crops); + return 0; + } diff --git a/master/html/_sources/functionlib/dsplib/batchtospace.rst.txt b/master/html/_sources/functionlib/dsplib/batchtospace.rst.txt deleted file mode 100644 index 251c1073..00000000 --- a/master/html/_sources/functionlib/dsplib/batchtospace.rst.txt +++ /dev/null @@ -1,96 +0,0 @@ -BatchToSpace -================= -将输入张量在批维度上分块并重新分布到空间维度,同时按照 ``crops`` 对输出空间范围进行裁剪。 - - .. math:: - - \begin{aligned} - N_{\text{out}} &= \frac{N}{b_h \times b_w}, \\ - H_{\text{out}} &= b_h \times H - c_{\text{top}} - c_{\text{bottom}}, \\ - W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\ - ext{output}[n, h, w, c] &= \text{input}[n', h', w', c] - \end{aligned} - - 其中 :math:`N, H, W, C` 分别表示输入的 batch、高度、宽度和通道数;:math:`b_h, b_w` 为 ``block_size``;:math:`c_{*}` 来源于 ``crops``;:math:`n', h', w'` 由 ``BatchToSpace`` 映射关系确定。 - - 输入: - - **input** - 输入数据地址。 - - **input_shape** - 输入形状,格式为 ``[batch, height, width, channel]``。 - - **block_size** - 分块因子,格式为 ``[block_h, block_w]``。 - - **crops** - 裁剪参数,格式为 ``[top, bottom, left, right]``。 - - **core_mask(int, 可选)** - 核掩码(仅适用于共享存储版本)。 - - 输出: - - **output** - 输出数据地址。 - - 支持平台: - ``FT78NE`` - ``MT7004`` - - .. note:: - - FT78NE 支持 fp32、fp64、cplx64、cplx128、int16、int8、int32 数据类型。 - - MT7004 支持 fp32、fp16、cplx64、int16、int32 数据类型。 - - -**共享存储版本:** - -.. c:function:: void i8_batchtospace_s(int8_t *input, int8_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void i16_batchtospace_s(int16_t *input, int16_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void i32_batchtospace_s(int32_t *input, int32_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void hp_batchtospace_s(half *input, half *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void fp_batchtospace_s(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void dp_batchtospace_s(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void c64_batchtospace_s(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) -.. c:function:: void c128_batchtospace_s(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask) - - - **C 调用示例:** - - .. code-block:: c - :linenos: - :emphasize-lines: 11 - - // 多核(共享存储)示例 - #include - - int main(int argc, char *argv[]) { - float *input = (float *)0xA0000000; // 输入在 DDR 空间 - float *output = (float *)0xB0000000; - int input_shape[4] = {400, 2, 2, 3}; - int block_size[2] = {2, 2}; - int crops[4] = {0, 0, 0, 0}; - int core_mask = 0xff; - fp_batchtospace_s(input, output, input_shape, block_size, crops, sizeof(float), core_mask); - return 0; - } - - -**私有存储版本:** - -.. c:function:: void i8_batchtospace_p(int8_t *input, int8_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void i16_batchtospace_p(int16_t *input, int16_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void i32_batchtospace_p(int32_t *input, int32_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void hp_batchtospace_p(half *input, half *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void fp_batchtospace_p(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void dp_batchtospace_p(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void c64_batchtospace_p(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size) -.. c:function:: void c128_batchtospace_p(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size) - - **C 调用示例:** - - .. code-block:: c - :linenos: - :emphasize-lines: 10 - - // 单核(私有存储)示例 - #include - - int main(int argc, char *argv[]) { - float *input = (float *)0x10000000; // 输入在 L2 空间 - float *output = (float *)0x10010000; - int input_shape[4] = {400, 2, 2, 3}; - int block_size[2] = {2, 2}; - int crops[4] = {0, 0, 0, 0}; - fp_batchtospace_p(input, output, input_shape, block_size, crops, sizeof(float)); - return 0; - } diff --git a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt index 374a81d7..14853af8 100644 --- a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt +++ b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt @@ -31,7 +31,7 @@ DSP Library C API Reference avg_pool_grad batchnorm batchnormgrad - batchtospace + batch_to_space batchtospacend biasadd biasaddgrad diff --git a/master/html/functionlib/dsplib/abs.html b/master/html/functionlib/dsplib/abs.html index a1b7c6eb..d30642a3 100644 --- a/master/html/functionlib/dsplib/abs.html +++ b/master/html/functionlib/dsplib/abs.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/abs_grad.html b/master/html/functionlib/dsplib/abs_grad.html index d3cb5538..ac990f52 100644 --- a/master/html/functionlib/dsplib/abs_grad.html +++ b/master/html/functionlib/dsplib/abs_grad.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/activation.html b/master/html/functionlib/dsplib/activation.html index 45e92d4d..9953cce3 100644 --- a/master/html/functionlib/dsplib/activation.html +++ b/master/html/functionlib/dsplib/activation.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/activation_grad.html b/master/html/functionlib/dsplib/activation_grad.html index f8871dc2..9882b599 100644 --- a/master/html/functionlib/dsplib/activation_grad.html +++ b/master/html/functionlib/dsplib/activation_grad.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/adam.html b/master/html/functionlib/dsplib/adam.html index c2030824..bf99aca4 100644 --- a/master/html/functionlib/dsplib/adam.html +++ b/master/html/functionlib/dsplib/adam.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/adamweightdecay.html b/master/html/functionlib/dsplib/adamweightdecay.html index 3d41d0eb..833af16b 100644 --- a/master/html/functionlib/dsplib/adamweightdecay.html +++ b/master/html/functionlib/dsplib/adamweightdecay.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/adder.html b/master/html/functionlib/dsplib/adder.html index 998a2874..8a9b4525 100644 --- a/master/html/functionlib/dsplib/adder.html +++ b/master/html/functionlib/dsplib/adder.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/addfusion.html b/master/html/functionlib/dsplib/addfusion.html index d903a114..99d130dc 100644 --- a/master/html/functionlib/dsplib/addfusion.html +++ b/master/html/functionlib/dsplib/addfusion.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/addgrad.html b/master/html/functionlib/dsplib/addgrad.html index 5f96af77..0474bd5d 100644 --- a/master/html/functionlib/dsplib/addgrad.html +++ b/master/html/functionlib/dsplib/addgrad.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/addn.html b/master/html/functionlib/dsplib/addn.html index 01015548..5abfcb3b 100644 --- a/master/html/functionlib/dsplib/addn.html +++ b/master/html/functionlib/dsplib/addn.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/affine.html b/master/html/functionlib/dsplib/affine.html index b7180d38..87f8d0c7 100644 --- a/master/html/functionlib/dsplib/affine.html +++ b/master/html/functionlib/dsplib/affine.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/all.html b/master/html/functionlib/dsplib/all.html index 8a84c83f..52afac05 100644 --- a/master/html/functionlib/dsplib/all.html +++ b/master/html/functionlib/dsplib/all.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/allgather.html b/master/html/functionlib/dsplib/allgather.html index b172681e..782e470d 100644 --- a/master/html/functionlib/dsplib/allgather.html +++ b/master/html/functionlib/dsplib/allgather.html @@ -78,7 +78,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/apply_momentum.html b/master/html/functionlib/dsplib/apply_momentum.html index ad0610cf..bbf67006 100644 --- a/master/html/functionlib/dsplib/apply_momentum.html +++ b/master/html/functionlib/dsplib/apply_momentum.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/argmax.html b/master/html/functionlib/dsplib/argmax.html index 17643515..431730ce 100644 --- a/master/html/functionlib/dsplib/argmax.html +++ b/master/html/functionlib/dsplib/argmax.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/argmin.html b/master/html/functionlib/dsplib/argmin.html index 39a7233a..62558bc9 100644 --- a/master/html/functionlib/dsplib/argmin.html +++ b/master/html/functionlib/dsplib/argmin.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/assert.html b/master/html/functionlib/dsplib/assert.html index 3357caaa..16dd5adf 100644 --- a/master/html/functionlib/dsplib/assert.html +++ b/master/html/functionlib/dsplib/assert.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/assign.html b/master/html/functionlib/dsplib/assign.html index 5814acc0..0e0ac06d 100644 --- a/master/html/functionlib/dsplib/assign.html +++ b/master/html/functionlib/dsplib/assign.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/assignadd.html b/master/html/functionlib/dsplib/assignadd.html index be856e6d..dda5399f 100644 --- a/master/html/functionlib/dsplib/assignadd.html +++ b/master/html/functionlib/dsplib/assignadd.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/attention.html b/master/html/functionlib/dsplib/attention.html index 91dd2e83..2be47ab3 100644 --- a/master/html/functionlib/dsplib/attention.html +++ b/master/html/functionlib/dsplib/attention.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/audio_spectrogram.html b/master/html/functionlib/dsplib/audio_spectrogram.html index 97c3c0b3..769f039d 100644 --- a/master/html/functionlib/dsplib/audio_spectrogram.html +++ b/master/html/functionlib/dsplib/audio_spectrogram.html @@ -78,7 +78,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/avg_pool_grad.html b/master/html/functionlib/dsplib/avg_pool_grad.html index f9906bec..abc97229 100644 --- a/master/html/functionlib/dsplib/avg_pool_grad.html +++ b/master/html/functionlib/dsplib/avg_pool_grad.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/avgpooling.html b/master/html/functionlib/dsplib/avgpooling.html index 2477d0b0..141c1966 100644 --- a/master/html/functionlib/dsplib/avgpooling.html +++ b/master/html/functionlib/dsplib/avgpooling.html @@ -79,7 +79,7 @@
  • AvgPoolGrad
  • BatchNorm
  • Batchnormgrad
  • -
  • BatchToSpace
  • +
  • BatchToSpace
  • BatchToSpaceND
  • Biasadd
  • Biasaddgrad
  • diff --git a/master/html/functionlib/dsplib/batchtospace.html b/master/html/functionlib/dsplib/batch_to_space.html similarity index 64% rename from master/html/functionlib/dsplib/batchtospace.html rename to master/html/functionlib/dsplib/batch_to_space.html index a41ee085..4ecd98d0 100644 --- a/master/html/functionlib/dsplib/batchtospace.html +++ b/master/html/functionlib/dsplib/batch_to_space.html @@ -300,7 +300,7 @@
  • - 查看页面源码 + 查看页面源码

  • @@ -324,7 +324,7 @@ W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\
    输入:
    • input - 输入数据地址。

    • -
    • input_shape - 输入形状,格式为 [batch, height, width, channel]

    • +
    • in_shape - 输入形状,格式为 [batch, height, width, channel]

    • block_size - 分块因子,格式为 [block_h, block_w]

    • crops - 裁剪参数,格式为 [top, bottom, left, right]

    • core_mask(int, 可选) - 核掩码(仅适用于共享存储版本)。

    • @@ -348,43 +348,43 @@ W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\

      共享存储版本:

      -
      -void i8_batchtospace_s(int8_t *input, int8_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void i8_batch_to_space_s(const int8_t *input, int8_t *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void i16_batchtospace_s(int16_t *input, int16_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void i16_batch_to_space_s(const int16_t *input, int16_t *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void i32_batchtospace_s(int32_t *input, int32_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void i32_batch_to_space_s(const int *input, int *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void hp_batchtospace_s(half *input, half *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void hp_batch_to_space_s(const half *input, half *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void fp_batchtospace_s(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void fp_batch_to_space_s(const float *input, float *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void dp_batchtospace_s(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void dp_batch_to_space_s(const double *input, double *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void c64_batchtospace_s(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void c64_batch_to_space_s(const float *input, float *output, const int *in_shape, const int *block, const int *crops, int core_mask)
      -
      -void c128_batchtospace_s(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size, int core_mask)
      +
      +void c128_batch_to_space_s(const double *input, double *output, const int *in_shape, const int *block, const int *crops, int core_mask)

      C 调用示例:

       1// 多核(共享存储)示例
        2#include <stdio.h>
      @@ -396,7 +396,7 @@ W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\
        8        int block_size[2] = {2, 2};
        9        int crops[4] = {0, 0, 0, 0};
       10        int core_mask = 0xff;
      -11        fp_batchtospace_s(input, output, input_shape, block_size, crops, sizeof(float), core_mask);
      +11        fp_batch_to_space_s(input, output, input_shape, block_size, crops, core_mask);
       12        return 0;
       13}
       
      @@ -405,43 +405,43 @@ W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\

      私有存储版本:

      -
      -void i8_batchtospace_p(int8_t *input, int8_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void i8_batch_to_space_p(const int8_t *input, int8_t *output, const int *in_shape, const int *block, const int *crops)
      -
      -void i16_batchtospace_p(int16_t *input, int16_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void i16_batch_to_space_p(const int16_t *input, int16_t *output, const int *in_shape, const int *block, const int *crops)
      -
      -void i32_batchtospace_p(int32_t *input, int32_t *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void i32_batch_to_space_p(const int *input, int *output, const int *in_shape, const int *block, const int *crops)
      -
      -void hp_batchtospace_p(half *input, half *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void hp_batch_to_space_p(const half *input, half *output, const int *in_shape, const int *block, const int *crops)
      -
      -void fp_batchtospace_p(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void fp_batch_to_space_p(const float *input, float *output, const int *in_shape, const int *block, const int *crops)
      -
      -void dp_batchtospace_p(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void dp_batch_to_space_p(const double *input, double *output, const int *in_shape, const int *block, const int *crops)
      -
      -void c64_batchtospace_p(float *input, float *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void c64_batch_to_space_p(const float *input, float *output, const int *in_shape, const int *block, const int *crops)
      -
      -void c128_batchtospace_p(double *input, double *output, const int *input_shape, const int *block_size, const int *crops, int data_size)
      +
      +void c128_batch_to_space_p(const double *input, double *output, const int *in_shape, const int *block, const int *crops)

      C 调用示例:

       1// 单核(私有存储)示例
        2#include <stdio.h>
      @@ -452,7 +452,7 @@ W_{\text{out}} &= b_w \times W - c_{\text{left}} - c_{\text{right}}, \\
        7        int input_shape[4] = {400, 2, 2, 3};
        8        int block_size[2] = {2, 2};
        9        int crops[4] = {0, 0, 0, 0};
      -10        fp_batchtospace_p(input, output, input_shape, block_size, crops, sizeof(float));
      +10        fp_batch_to_space_p(input, output, input_shape, block_size, crops);
       11        return 0;
       12}
       
      diff --git a/master/html/functionlib/dsplib/batchnorm.html b/master/html/functionlib/dsplib/batchnorm.html index 2286f1a8..e2a12129 100644 --- a/master/html/functionlib/dsplib/batchnorm.html +++ b/master/html/functionlib/dsplib/batchnorm.html @@ -79,7 +79,7 @@
    • AvgPoolGrad
    • BatchNorm
    • Batchnormgrad
    • -
    • BatchToSpace
    • +
    • BatchToSpace
    • BatchToSpaceND
    • Biasadd
    • Biasaddgrad
    • diff --git a/master/html/functionlib/dsplib/batchnormgrad.html b/master/html/functionlib/dsplib/batchnormgrad.html index ee99f953..e5090ca5 100644 --- a/master/html/functionlib/dsplib/batchnormgrad.html +++ b/master/html/functionlib/dsplib/batchnormgrad.html @@ -24,7 +24,7 @@ - + @@ -79,7 +79,7 @@
    • AvgPoolGrad
    • BatchNorm
    • Batchnormgrad
    • -
    • BatchToSpace
    • +
    • BatchToSpace
    • BatchToSpaceND
    • Biasadd
    • Biasaddgrad
    • @@ -459,7 +459,7 @@ dbias(\beta) &= \sum_{i=1}^{m} dy_i\end{split}\]