Browse Source

optimizes the documentation of chinese API of LSTM,EmbeddingLookup,etc.

r1.7
zhangfanghe 4 years ago
parent
commit
ee02818bef
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      docs/api/api_python/nn/mindspore.nn.LSTM.rst
  2. +1
    -1
      mindspore/python/mindspore/nn/layer/embedding.py

+ 2
- 2
docs/api/api_python/nn/mindspore.nn.LSTM.rst View File

@@ -51,7 +51,7 @@ mindspore.nn.LSTM

**异常:**

- **TypeError** - `input_size`, `hidden_size` 或 `num_layers` 不是整数
- **TypeError** - `input_size`, `hidden_size` 或 `num_layers` 不是int
- **TypeError** - `has_bias` , `batch_first` 或 `bidirectional` 不是bool。
- **TypeError** - `dropout` 既不是浮点数也不是整数
- **TypeError** - `dropout` 既不是float也不是int
- **ValueError** - `dropout` 不在[0.0, 1.0]范围内。

+ 1
- 1
mindspore/python/mindspore/nn/layer/embedding.py View File

@@ -176,7 +176,7 @@ class EmbeddingLookup(Cell):
['DEVICE', 'CPU']. Default: 'CPU'.
slice_mode (str): The slicing way in semi_auto_parallel/auto_parallel. The value must get through
:class:`mindspore.nn.EmbeddingLookup`. Default: :class:`mindspore.nn.EmbeddingLookup.BATCH_SLICE`.
manual_shapes (tuple): The accompaniment array in field slice mode, Default: None.
manual_shapes (tuple): The accompaniment array in field slice mode. Default: None.
max_norm (Union[float, None]): A maximum clipping value. The data type must be float16, float32
or None. Default: None
sparse (bool): Using sparse mode. When 'target' is set to 'CPU', 'sparse' has to be true. Default: True.


Loading…
Cancel
Save