From ee02818befada1d9ad148fd3c107d64b53ed1ad3 Mon Sep 17 00:00:00 2001 From: zhangfanghe Date: Tue, 29 Mar 2022 10:07:52 +0800 Subject: [PATCH] optimizes the documentation of chinese API of LSTM,EmbeddingLookup,etc. --- docs/api/api_python/nn/mindspore.nn.LSTM.rst | 4 ++-- mindspore/python/mindspore/nn/layer/embedding.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/api_python/nn/mindspore.nn.LSTM.rst b/docs/api/api_python/nn/mindspore.nn.LSTM.rst index 10b75169946..9cf852a27ed 100644 --- a/docs/api/api_python/nn/mindspore.nn.LSTM.rst +++ b/docs/api/api_python/nn/mindspore.nn.LSTM.rst @@ -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]范围内。 diff --git a/mindspore/python/mindspore/nn/layer/embedding.py b/mindspore/python/mindspore/nn/layer/embedding.py index 9328ef868d7..2750aade333 100755 --- a/mindspore/python/mindspore/nn/layer/embedding.py +++ b/mindspore/python/mindspore/nn/layer/embedding.py @@ -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.