commit 42a10ceda5e64d856b8d2091687c2ca2a86cbdcd Author: Coet Date: Wed Aug 1 13:10:00 2018 +0800 First wiki page 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)