From 42a10ceda5e64d856b8d2091687c2ca2a86cbdcd Mon Sep 17 00:00:00 2001 From: Coet Date: Wed, 1 Aug 2018 13:10:00 +0800 Subject: [PATCH] First wiki page --- How-to-train-a-model?.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 How-to-train-a-model?.md diff --git a/How-to-train-a-model?.md b/How-to-train-a-model?.md new file mode 100644 index 0000000..06cc15e --- /dev/null +++ b/How-to-train-a-model?.md @@ -0,0 +1,8 @@ +1. Define a model, which is initialized with `args`. +[example](https://github.com/fastnlp/fastNLP/blob/743a6d75474fa393bc849c0392317c2c6bd868e4/fastNLP/models/sequence_modeling.py#L12) + +2. Set model parameters in the config file. The parameters you set will be packed as `args` and used in model initialization. +[example](https://github.com/fastnlp/fastNLP/blob/743a6d75474fa393bc849c0392317c2c6bd868e4/reproduction/chinese_word_seg/cws.cfg#L1) + +3. Write a script to use Trainer. +[example](https://github.com/fastnlp/fastNLP/blob/743a6d75474fa393bc849c0392317c2c6bd868e4/reproduction/chinese_word_seg/cws_train.py#L51)