diff --git a/docs/source/conf.py b/docs/source/conf.py index ff3639fa..e521b3d6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,6 +43,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary', + 'sphinx.ext.mathjax', ] diff --git a/docs/source/fastNLP.saver.rst b/docs/source/fastNLP.saver.rst index daa6fbe8..1a02572d 100644 --- a/docs/source/fastNLP.saver.rst +++ b/docs/source/fastNLP.saver.rst @@ -1,6 +1,12 @@ fastNLP.saver ============== +fastNLP.saver.config\_saver +---------------------------- + +.. automodule:: fastNLP.saver.config_saver + :members: + fastNLP.saver.logger --------------------- diff --git a/docs/source/figures/procedures.PNG b/docs/source/figures/procedures.PNG new file mode 100644 index 00000000..982249e8 Binary files /dev/null and b/docs/source/figures/procedures.PNG differ diff --git a/docs/source/figures/procedures_and_sequence_labeling.png b/docs/source/figures/procedures_and_sequence_labeling.png deleted file mode 100644 index 06adc051..00000000 Binary files a/docs/source/figures/procedures_and_sequence_labeling.png and /dev/null differ diff --git a/docs/source/figures/sequence_labeling.PNG b/docs/source/figures/sequence_labeling.PNG new file mode 100644 index 00000000..397f0a24 Binary files /dev/null and b/docs/source/figures/sequence_labeling.PNG differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 37798321..b58f712a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,13 +12,15 @@ fastNLP是一个基于PyTorch的模块化自然语言处理系统,用于快速 而每个类别包含不同的实现模块。 大多数当前的NLP模型可以构建在这些模块上,这极大地简化了开发NLP模型的过程。 -fastNLP的架构如下左图所示: +fastNLP的架构如图所示: -.. image:: figures/procedures_and_sequence_labeling.png +.. image:: figures/procedures.PNG -在constructing model部分,以序列标注(上右图)和文本分类(下图)为例进行说明: +在constructing model部分,以序列标注和文本分类为例进行说明: .. image:: figures/text_classification.png +.. image:: figures/sequence_labeling.PNG + :width: 400 * encoder module:将输入编码为一些抽象表示,输入的是单词序列,输出向量序列。 * interaction module:使表示中的信息相互交互,输入的是向量序列,输出的也是向量序列。 diff --git a/test/readme_example.py b/examples/readme_example.py similarity index 100% rename from test/readme_example.py rename to examples/readme_example.py diff --git a/test/test_metrics.py b/test/core/test_metrics.py similarity index 100% rename from test/test_metrics.py rename to test/core/test_metrics.py diff --git a/test/test_tester.py b/test/core/test_tester.py similarity index 100% rename from test/test_tester.py rename to test/core/test_tester.py diff --git a/test/test_loader.py b/test/loader/test_loader2.py similarity index 100% rename from test/test_loader.py rename to test/loader/test_loader2.py diff --git a/test/seq_labeling.py b/test/model/seq_labeling.py similarity index 100% rename from test/seq_labeling.py rename to test/model/seq_labeling.py diff --git a/test/test_charlm.py b/test/model/test_charlm.py similarity index 100% rename from test/test_charlm.py rename to test/model/test_charlm.py diff --git a/test/test_cws.py b/test/model/test_cws.py similarity index 100% rename from test/test_cws.py rename to test/model/test_cws.py diff --git a/test/text_classify.py b/test/model/text_classify.py similarity index 100% rename from test/text_classify.py rename to test/model/text_classify.py diff --git a/test/test_trainer.py b/test/test_trainer.py deleted file mode 100644 index a0585173..00000000 --- a/test/test_trainer.py +++ /dev/null @@ -1,6 +0,0 @@ -def test_trainer(): - pass - - -if __name__ == "__main__": - test_trainer()