Browse Source

删除了一些冗余文档

tags/v0.4.10
ChenXin 6 years ago
parent
commit
0860e0a81c
8 changed files with 3 additions and 38 deletions
  1. +0
    -7
      docs/source/fastNLP.models.char_language_model.rst
  2. +0
    -1
      docs/source/fastNLP.models.rst
  3. +0
    -7
      docs/source/fastNLP.modules.dropout.rst
  4. +0
    -7
      docs/source/fastNLP.modules.encoder.linear.rst
  5. +0
    -1
      docs/source/fastNLP.modules.encoder.rst
  6. +0
    -7
      docs/source/fastNLP.modules.other_modules.rst
  7. +0
    -7
      docs/source/fastNLP.modules.utils.rst
  8. +3
    -1
      fastNLP/core/callback.py

+ 0
- 7
docs/source/fastNLP.models.char_language_model.rst View File

@@ -1,7 +0,0 @@
fastNLP.models.char\_language\_model module
===========================================

.. automodule:: fastNLP.models.char_language_model
:members:
:undoc-members:
:show-inheritance:

+ 0
- 1
docs/source/fastNLP.models.rst View File

@@ -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


+ 0
- 7
docs/source/fastNLP.modules.dropout.rst View File

@@ -1,7 +0,0 @@
fastNLP.modules.dropout module
==============================

.. automodule:: fastNLP.modules.dropout
:members:
:undoc-members:
:show-inheritance:

+ 0
- 7
docs/source/fastNLP.modules.encoder.linear.rst View File

@@ -1,7 +0,0 @@
fastNLP.modules.encoder.linear module
=====================================

.. automodule:: fastNLP.modules.encoder.linear
:members:
:undoc-members:
:show-inheritance:

+ 0
- 1
docs/source/fastNLP.modules.encoder.rst View File

@@ -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


+ 0
- 7
docs/source/fastNLP.modules.other_modules.rst View File

@@ -1,7 +0,0 @@
fastNLP.modules.other\_modules module
=====================================

.. automodule:: fastNLP.modules.other_modules
:members:
:undoc-members:
:show-inheritance:

+ 0
- 7
docs/source/fastNLP.modules.utils.rst View File

@@ -1,7 +0,0 @@
fastNLP.modules.utils module
============================

.. automodule:: fastNLP.modules.utils
:members:
:undoc-members:
:show-inheritance:

+ 3
- 1
fastNLP/core/callback.py View File

@@ -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'):


Loading…
Cancel
Save