Browse Source

fix a little error in doc.

TODO: fix the bug doc of the class which inherit the class from outer space
tags/v0.4.10
ChenXin 5 years ago
parent
commit
60a535db08
2 changed files with 6 additions and 6 deletions
  1. +1
    -0
      fastNLP/core/metrics.py
  2. +5
    -6
      fastNLP/core/optimizer.py

+ 1
- 0
fastNLP/core/metrics.py View File

@@ -152,6 +152,7 @@ class MetricBase(object):
def get_metric_name(self): def get_metric_name(self):
""" """
返回metric的名称 返回metric的名称
:return: :return:
""" """
return self._metric_name return self._metric_name


+ 5
- 6
fastNLP/core/optimizer.py View File

@@ -120,12 +120,11 @@ class AdamW(TorchOptimizer):
The original Adam algorithm was proposed in `Adam: A Method for Stochastic Optimization`_. The original Adam algorithm was proposed in `Adam: A Method for Stochastic Optimization`_.
The AdamW variant was proposed in `Decoupled Weight Decay Regularization`_. The AdamW variant was proposed in `Decoupled Weight Decay Regularization`_.


.. _Adam\: A Method for Stochastic Optimization:
https://arxiv.org/abs/1412.6980
.. _Decoupled Weight Decay Regularization:
https://arxiv.org/abs/1711.05101
.. _On the Convergence of Adam and Beyond:
https://openreview.net/forum?id=ryQu7f-RZ
.. _Adam\: A Method for Stochastic Optimization: https://arxiv.org/abs/1412.6980
.. _Decoupled Weight Decay Regularization: https://arxiv.org/abs/1711.05101
.. _On the Convergence of Adam and Beyond: https://openreview.net/forum?id=ryQu7f-RZ
""" """


def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8,


Loading…
Cancel
Save