Browse Source

fix api comment's format.

tags/v1.2.0-rc1
zhangyi 4 years ago
parent
commit
69ee1a077f
4 changed files with 8 additions and 6 deletions
  1. +2
    -0
      mindspore/common/parameter.py
  2. +3
    -3
      mindspore/dataset/transforms/c_transforms.py
  3. +1
    -0
      mindspore/ops/operations/array_ops.py
  4. +2
    -3
      mindspore/ops/operations/sponge_ops.py

+ 2
- 0
mindspore/common/parameter.py View File

@@ -502,9 +502,11 @@ class Parameter(Tensor_):
Args:
layout (Union[None, list(list(int))]): Parameter slice
layout [dev_mat, tensor_map, slice_shape]. Default: None.

- dev_mat (list(int)): Device matrix.
- tensor_map (list(int)): Tensor map.
- slice_shape (list(int)): Shape of slice.

set_sliced (bool): True if the parameter is set sliced after initializing the data.
Default: False.



+ 3
- 3
mindspore/dataset/transforms/c_transforms.py View File

@@ -164,15 +164,15 @@ class Slice(cde.SliceOp):
(Currently only rank-1 tensors are supported).

Args:
*slices(Union[int, list(int), slice, None, Ellipsis]):
Maximum `n` number of arguments to slice a tensor of rank `n`.
slices (Union[int, list[int], slice, None, Ellipsis]):
Maximum `n` number of arguments to slice a tensor of rank `n` .
One object in slices can be one of:

1. :py:obj:`int`: Slice this index only along the first dimension. Negative index is supported.
2. :py:obj:`list(int)`: Slice these indices along the first dimension. Negative indices are supported.
3. :py:obj:`slice`: Slice the generated indices from the slice object along the first dimension.
Similar to start:stop:step.
4. :py:obj:`None`: Slice the whole dimension. Similar to :py:obj:`[:]' in Python indexing.
4. :py:obj:`None`: Slice the whole dimension. Similar to :py:obj:`[:]` in Python indexing.
5. :py:obj:`Ellipsis`: Slice the whole dimension, same result with `None`.

Examples:


+ 1
- 0
mindspore/ops/operations/array_ops.py View File

@@ -1887,6 +1887,7 @@ class Tile(PrimitiveWithInfer):

Outputs:
Tensor, has the same data type as the `input_x`.

- If the length of `multiples` is the same as the length of shape of `input_x`,
then the shape of their corresponding positions can be multiplied, and
the shape of Outputs is :math:`(x_1*y_1, x_2*y_2, ..., x_S*y_R)`.


+ 2
- 3
mindspore/ops/operations/sponge_ops.py View File

@@ -901,11 +901,10 @@ class Dihedral14LJForce(PrimitiveWithInfer):
F = k*(-12*A/|dr|^{14} + 6*B/|dr|^{8})*dr
Args:
dihedral_14_numbers(int32): the number of necessary dihedral 1,4 terms M.
atom_numbers(int32): the number of atoms N.
dihedral_14_numbers (int32): the number of necessary dihedral 1,4 terms M.
atom_numbers (int32): the number of atoms N.
Inputs:
- **uint_crd_f** (Tensor, uint32) - [N, 3], the unsigned int coordinate value of each atom.
- **LJ_type** (Tensor, int32) - [N,], the Lennard-Jones type of each atom.
- **charge** (Tensor, float32) - [N,], the charge of each atom.


Loading…
Cancel
Save