diff --git a/docs/source/fastNLP.models.char_language_model.rst b/docs/source/fastNLP.models.char_language_model.rst deleted file mode 100644 index 8cfc9e6e..00000000 --- a/docs/source/fastNLP.models.char_language_model.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.models.char\_language\_model module -=========================================== - -.. automodule:: fastNLP.models.char_language_model - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.models.rst b/docs/source/fastNLP.models.rst index ae4abf7a..24fca203 100644 --- a/docs/source/fastNLP.models.rst +++ b/docs/source/fastNLP.models.rst @@ -14,7 +14,6 @@ Submodules fastNLP.models.base_model fastNLP.models.bert fastNLP.models.biaffine_parser - fastNLP.models.char_language_model fastNLP.models.cnn_text_classification fastNLP.models.enas_controller fastNLP.models.enas_model diff --git a/docs/source/fastNLP.modules.dropout.rst b/docs/source/fastNLP.modules.dropout.rst deleted file mode 100644 index f525e08f..00000000 --- a/docs/source/fastNLP.modules.dropout.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.dropout module -============================== - -.. automodule:: fastNLP.modules.dropout - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.modules.encoder.linear.rst b/docs/source/fastNLP.modules.encoder.linear.rst deleted file mode 100644 index 7a479ca2..00000000 --- a/docs/source/fastNLP.modules.encoder.linear.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.encoder.linear module -===================================== - -.. automodule:: fastNLP.modules.encoder.linear - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.modules.encoder.rst b/docs/source/fastNLP.modules.encoder.rst index 3ee246c2..e571331d 100644 --- a/docs/source/fastNLP.modules.encoder.rst +++ b/docs/source/fastNLP.modules.encoder.rst @@ -15,7 +15,6 @@ Submodules fastNLP.modules.encoder.char_encoder fastNLP.modules.encoder.conv_maxpool fastNLP.modules.encoder.embedding - fastNLP.modules.encoder.linear fastNLP.modules.encoder.lstm fastNLP.modules.encoder.star_transformer fastNLP.modules.encoder.transformer diff --git a/docs/source/fastNLP.modules.other_modules.rst b/docs/source/fastNLP.modules.other_modules.rst deleted file mode 100644 index c1bba5fb..00000000 --- a/docs/source/fastNLP.modules.other_modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.other\_modules module -===================================== - -.. automodule:: fastNLP.modules.other_modules - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.modules.utils.rst b/docs/source/fastNLP.modules.utils.rst deleted file mode 100644 index b7eb672e..00000000 --- a/docs/source/fastNLP.modules.utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.utils module -============================ - -.. automodule:: fastNLP.modules.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/fastNLP/core/callback.py b/fastNLP/core/callback.py index a6cc3402..0a2d052f 100644 --- a/fastNLP/core/callback.py +++ b/fastNLP/core/callback.py @@ -293,7 +293,8 @@ class CallbackManager(Callback): class GradientClipCallback(Callback): - """每次backward前,将parameter的gradient clip到某个范围。 + """ + 每次backward前,将parameter的gradient clip到某个范围。 :param None,torch.Tensor,List[torch.Tensor] parameters: 一般通过model.parameters()获得。如果为None则默认对Trainer 的model中所有参数进行clip @@ -304,6 +305,7 @@ class GradientClipCallback(Callback): 2 'value', 将gradient限制在[-clip_value, clip_value], 小于-clip_value的gradient被赋值为-clip_value; 大于clip_value的gradient被赋值为clip_value. + """ def __init__(self, parameters=None, clip_value=1, clip_type='norm'):