diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..d9dd3f92 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,11 @@ +version: 2 + +sphinx: + configuration: docs/conf.py + +build: + image: latest + +python: + version: 3.6 + setup_py_install: true \ No newline at end of file diff --git a/README.md b/README.md index f4a8f2a6..77758cfd 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ pip install fastNLP ``` +## 参考资源 + +- [文档](https://fastnlp.readthedocs.io/zh/latest/) +- [源码](https://github.com/fastnlp/fastNLP) + + + ## 内置组件 大部分用于的 NLP 任务神经网络都可以看做由编码(encoder)、聚合(aggregator)、解码(decoder)三种模块组成。 @@ -102,11 +109,6 @@ fastNLP的大致工作流程如上图所示,而项目结构如下: -## 参考资源 - -- [教程](https://github.com/fastnlp/fastNLP/tree/master/tutorials) -- [文档](https://fastnlp.readthedocs.io/en/latest/) -- [源码](https://github.com/fastnlp/fastNLP) diff --git a/fastNLP/core/losses.py b/fastNLP/core/losses.py index 35c14770..9dc02f3d 100644 --- a/fastNLP/core/losses.py +++ b/fastNLP/core/losses.py @@ -227,7 +227,7 @@ class CrossEntropyLoss(LossBase): Example:: - >>> loss = CrossEntropyLoss(pred='pred', target='label', padding_idx=0) + loss = CrossEntropyLoss(pred='pred', target='label', padding_idx=0) """ diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 9b172987..00000000 --- a/readthedocs.yml +++ /dev/null @@ -1,6 +0,0 @@ -build: - image: latest - -python: - version: 3.6 - setup_py_install: true \ No newline at end of file