Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadiaphy committed Oct 17, 2019
1 parent 5243a06 commit d5df50b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/operator/nn/im2col.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ void SlidingParser(nnvm::NodeAttrs* attrs) {
NNVM_REGISTER_OP(im2col)
.describe(R"(Extract sliding blocks from input array.
Im2col is used in vanilla convolution implementation to transform the sliding
This operator is used in vanilla convolution implementation to transform the sliding
blocks on image to column matrix, then the convolution operation can be computed
by matrix multiplication between column and convolution weight. Due to the close
relation between im2col and convolution, the concept of ``kernel``, ``stride``,
``dilate`` and ``pad`` in this operator are inherited from convolution operation.
relation between im2col and convolution, the concept of **kernel**, **stride**,
**dilate** and **pad** in this operator are inherited from convolution operation.
Given the input data of shape :math:`(N, C, *)`, where :math:`N` is the batch size,
:math:`C` is the channel size, and :math:`*` is the arbitrary spatial dimension,
Expand Down Expand Up @@ -164,15 +164,15 @@ NNVM_REGISTER_OP(_backward_im2col)
NNVM_REGISTER_OP(col2im)
.describe(R"(Combining the output column matrix of im2col back to image array.
Like :class:`.im2col`, the col2im is also used in the vanilla convolution implementation.
Despite the name, col2im is not the reverse operation of im2col. Since there may be
overlaps between neighbouring sliding blocks, the column elements cannot be directly
Like :class:`~mxnet.ndarray.im2col`, this operator is also used in the vanilla convolution
implementation. Despite the name, col2im is not the reverse operation of im2col. Since there
may be overlaps between neighbouring sliding blocks, the column elements cannot be directly
put back into image. Instead, they are accumulated (i.e., summed) in the input image
just like the gradient computation, so col2im is the gradient of im2col and vice versa.
Using the notation in im2col, given an input column array of shape
:math:`(N, C \times \prod(\text{kernel}), W)`, this operator accumulates the column elements
into output array of shape :math:`(N, C, \text{output\_size}[0], \text{output\_size}[1], \dots)`.
into output array of shape :math:`(N, C, \text{output_size}[0], \text{output_size}[1], \dots)`.
Only 1-D, 2-D and 3-D of spatial dimension is supported in this operator.
)" ADD_FILELINE)
Expand Down

0 comments on commit d5df50b

Please sign in to comment.