diff --git a/docs/source/fastNLP.modules.aggregator.attention.rst b/docs/source/fastNLP.modules.aggregator.attention.rst deleted file mode 100644 index dc9c2b53..00000000 --- a/docs/source/fastNLP.modules.aggregator.attention.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.aggregator.attention -==================================== - -.. automodule:: fastNLP.modules.aggregator.attention - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.modules.aggregator.pooling.rst b/docs/source/fastNLP.modules.aggregator.pooling.rst deleted file mode 100644 index 162f889d..00000000 --- a/docs/source/fastNLP.modules.aggregator.pooling.rst +++ /dev/null @@ -1,7 +0,0 @@ -fastNLP.modules.aggregator.pooling -================================== - -.. automodule:: fastNLP.modules.aggregator.pooling - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/fastNLP.modules.aggregator.rst b/docs/source/fastNLP.modules.aggregator.rst deleted file mode 100644 index 44398325..00000000 --- a/docs/source/fastNLP.modules.aggregator.rst +++ /dev/null @@ -1,17 +0,0 @@ -fastNLP.modules.aggregator -========================== - -.. automodule:: fastNLP.modules.aggregator - :members: - :undoc-members: - :show-inheritance: - -子模块 ----------- - -.. toctree:: - :titlesonly: - - fastNLP.modules.aggregator.attention - fastNLP.modules.aggregator.pooling - diff --git a/docs/source/fastNLP.modules.rst b/docs/source/fastNLP.modules.rst index d04ccdcf..7f75cfdc 100644 --- a/docs/source/fastNLP.modules.rst +++ b/docs/source/fastNLP.modules.rst @@ -12,6 +12,5 @@ fastNLP.modules .. toctree:: :titlesonly: - fastNLP.modules.aggregator fastNLP.modules.decoder fastNLP.modules.encoder \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst index 1ca9f249..ca000859 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -55,7 +55,6 @@ fastNLP 在 :mod:`~fastNLP.models` 模块中内置了如 :class:`~fastNLP.models 安装指南 快速入门 详细指南 - 科研指南 API 文档 ------------- diff --git a/docs/source/user/with_fitlog.rst b/docs/source/tutorials/tutorial_10_fitlog.rst similarity index 96% rename from docs/source/user/with_fitlog.rst rename to docs/source/tutorials/tutorial_10_fitlog.rst index 51445775..0fa24143 100644 --- a/docs/source/user/with_fitlog.rst +++ b/docs/source/tutorials/tutorial_10_fitlog.rst @@ -1,6 +1,6 @@ -================= -科研向导 -================= +============================================ +使用fitlog 辅助 fastNLP 进行科研 +============================================ 本文介绍结合使用 fastNLP 和 fitlog 进行科研的方法。 diff --git a/docs/source/tutorials/tutorial_1_data_preprocess.rst b/docs/source/tutorials/tutorial_1_data_preprocess.rst index 9947c114..cd97ca75 100644 --- a/docs/source/tutorials/tutorial_1_data_preprocess.rst +++ b/docs/source/tutorials/tutorial_1_data_preprocess.rst @@ -122,6 +122,9 @@ FastNLP 同样提供了多种删除数据的方法 :func:`~fastNLP.DataSet.drop` return words dataset.apply(get_words, new_field_name='words') +除了手动处理数据集之外,你还可以使用 fastNLP 提供的各种 :class:`~fastNLP.io.base_loader.DataSetLoader` 来进行数据处理。 +详细请参考这篇教程 :doc:`使用DataSetLoader加载数据集 ` 。 + ----------------------------- DataSet与pad ----------------------------- diff --git a/docs/source/tutorials/tutorial_9_callback.rst b/docs/source/tutorials/tutorial_9_callback.rst index d0758c8d..01fbb6c3 100644 --- a/docs/source/tutorials/tutorial_9_callback.rst +++ b/docs/source/tutorials/tutorial_9_callback.rst @@ -1,4 +1,3 @@ - ============================================================================== Callback 教程 ============================================================================== @@ -54,6 +53,7 @@ Callback的构建和使用 在定义好 :class:`~fastNLP.Callback` 之后,就能将它传入Trainer的 ``callbacks`` 参数,在实际训练时使用。 .. code-block:: python + """ 数据预处理,模型定义等等 """ diff --git a/docs/source/user/example.rst b/docs/source/user/example.rst index 5245aaa2..70ebe628 100644 --- a/docs/source/user/example.rst +++ b/docs/source/user/example.rst @@ -124,6 +124,19 @@ False False False True True True ===== ===== ====== +csv 表格 +============ + +.. csv-table:: + :header: sentence, target + + This is the first instance ., 0 + Second instance ., 1 + Third instance ., 1 + ..., ... + + + [重要]各种链接 =================== @@ -131,7 +144,7 @@ True True True \<\>内表示的是链接地址,\<\>外的是显示到外面的文字 -:doc:`根据文件名链接 ` +:doc:`根据文件名链接 ` :mod:`~fastNLP.core.batch` diff --git a/docs/source/user/tutorials.rst b/docs/source/user/tutorials.rst index 9fa10472..cd1fba05 100644 --- a/docs/source/user/tutorials.rst +++ b/docs/source/user/tutorials.rst @@ -14,4 +14,5 @@ fastNLP详细使用教程 7. 使用Modules和Models快速搭建自定义模型 8. 使用Metric快速评测你的模型 9. 使用Callback自定义你的训练过程 + 10. 使用fitlog 辅助 fastNLP 进行科研 diff --git a/fastNLP/core/callback.py b/fastNLP/core/callback.py index 75f92140..8a202795 100644 --- a/fastNLP/core/callback.py +++ b/fastNLP/core/callback.py @@ -674,7 +674,7 @@ class TensorboardCallback(Callback): .. warning:: fastNLP 已停止对此功能的维护,请等待 fastNLP 兼容 PyTorch1.1 的下一个版本。 - 或者使用和 fastNLP 高度配合的 fitlog(参见 :doc:`/user/with_fitlog` )。 + 或者使用和 fastNLP 高度配合的 fitlog(参见 :doc:`/tutorials/tutorial_10_fitlog` )。 """