You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/15 18:14:33 UTC

[GitHub] sandeep-krishnamurthy closed pull request #13256: Fix sphinx issues

sandeep-krishnamurthy closed pull request #13256: Fix sphinx issues 
URL: https://github.com/apache/incubator-mxnet/pull/13256
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/operator/contrib/index_copy.cc b/src/operator/contrib/index_copy.cc
index 316c8a7187f..70a32a1b2d9 100644
--- a/src/operator/contrib/index_copy.cc
+++ b/src/operator/contrib/index_copy.cc
@@ -37,30 +37,32 @@ static bool IndexCopyType(const nnvm::NodeAttrs& attrs,
 }
 
 NNVM_REGISTER_OP(_contrib_index_copy)
-.describe(R"code(Copies the elements of a `new_tensor` into the `old_tensor` by 
-selecting the indices in the order given in `index`. The output will be a new tensor 
-contains the rest elements of old tensor and the copied elements of new tensor. 
-For example, if `index[i] == j`, then the `i`th row of `new_tensor` is copied to the 
-`j`th row of output.
+.describe(R"code(Copies the elements of a `new_tensor` into the `old_tensor`.
 
-The `index` must be a vector and it must have the same size with the `0`th dimimention of 
-`new_tensor`. Also, the `0`th dimimention of old_tensor must `>=` the `0`th dimimention of 
+This operator copies the elements by selecting the indices in the order given in `index`.
+The output will be a new tensor containing the rest elements of old tensor and
+the copied elements of new tensor.
+For example, if `index[i] == j`, then the `i` th row of `new_tensor` is copied to the
+`j` th row of output.
+
+The `index` must be a vector and it must have the same size with the `0` th dimension of
+`new_tensor`. Also, the `0` th dimension of old_tensor must `>=` the `0` th dimension of
 `new_tensor`, or an error will be raised.
 
 Examples::
 
-x = mx.nd.zeros((5,3))
-t = mx.nd.array([[1,2,3],[4,5,6],[7,8,9]])
-index = mx.nd.array([0,4,2])
+    x = mx.nd.zeros((5,3))
+    t = mx.nd.array([[1,2,3],[4,5,6],[7,8,9]])
+    index = mx.nd.array([0,4,2])
 
-mx.nd.contrib.index_copy(x, index, t)
+    mx.nd.contrib.index_copy(x, index, t)
 
-[[1. 2. 3.]
- [0. 0. 0.]
- [7. 8. 9.]
- [0. 0. 0.]
- [4. 5. 6.]]
-<NDArray 5x3 @cpu(0)>
+    [[1. 2. 3.]
+     [0. 0. 0.]
+     [7. 8. 9.]
+     [0. 0. 0.]
+     [4. 5. 6.]]
+    <NDArray 5x3 @cpu(0)>
 
 )code" ADD_FILELINE)
 .set_num_inputs(3)
diff --git a/src/operator/contrib/quadratic_op.cc b/src/operator/contrib/quadratic_op.cc
index d8b2d785c79..043379e4407 100644
--- a/src/operator/contrib/quadratic_op.cc
+++ b/src/operator/contrib/quadratic_op.cc
@@ -29,12 +29,16 @@ namespace op {
 DMLC_REGISTER_PARAMETER(QuadraticParam);
 
 NNVM_REGISTER_OP(_contrib_quadratic)
-.describe(R"code(This operators implements the quadratic function:
+.describe(R"code(This operators implements the quadratic function.
+
 .. math::
     f(x) = ax^2+bx+c
+
 where :math:`x` is an input tensor and all operations
 in the function are element-wise.
+
 Example::
+
   x = [[1, 2], [3, 4]]
   y = quadratic(data=x, a=1, b=2, c=3)
   y = [[6, 11], [18, 27]]
diff --git a/src/operator/contrib/roi_align.cc b/src/operator/contrib/roi_align.cc
index 3ce2213d739..76675677fa0 100644
--- a/src/operator/contrib/roi_align.cc
+++ b/src/operator/contrib/roi_align.cc
@@ -515,8 +515,8 @@ input features at four regularly sampled locations in each RoI bin.
 Then the feature map can be aggregated by avgpooling.
 
 
-Reference
----------
+References
+----------
 
 He, Kaiming, et al. "Mask R-CNN." ICCV, 2017
 )code" ADD_FILELINE)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services