Commit Graph

31 Commits

Author SHA1 Message Date
yunfan
819c8f05be fix vocab 2018-09-19 15:10:18 +08:00
yunfan
8f60a4fa01 update MLP 2018-09-18 15:57:44 +08:00
2017alan
b3e8db74a6 add self_attention for yelp classification example. 2018-09-15 17:19:56 +08:00
FengZiYjun
57911f771a - clean up unused codes
- improve code comments
- BaseLoader & its subclasses does not need a data name any more
- update file tree
- add setup.py
2018-09-02 13:32:57 +08:00
FengZiYjun
32a036e8e6 [fix] drop "data" in Tester.make_batch; correct spelling of "show_metrics"
[add] PeopleDailyCorpusLoader, to parse PeopleDaily Corpus
[update] add CWS + POS_tag interface at FastNLP, see example in test_fastNLP.py
[update] modify README.md and readme_example.py to the latest version.
2018-09-01 21:33:28 +08:00
FengZiYjun
501ffb26c5 optimize CWS example
- see test_fastNLP.py
- update interpret_word_seg_results in fastnlp.py
- delete useless data to increase git clone speed
2018-08-31 11:23:40 +08:00
FengZiYjun
ab55f25e20 Updates to Trainer/Tester/fastnlp
1. Tester has a parameter "print_every_step" to control printing. print_every_step == 0 means NO print.
2. Tester's evaluate return (list of) floats, rather than torch.cuda.tensor
3. Trainer also has a parameter "print_every_step". The same usage.
4. In training, validation steps are not shown.
5. Updates to code comments.
6. fastnlp.py is ready for CWS. test_fastNLP.py works.
2018-08-31 10:46:56 +08:00
FengZiYjun
9d6b0daa99 Prepare for CWS service:
- specify the name of the config file and the name of corresponding section where model init params store.
- fastnlp.py needs load_pickle to get dictionary size and the number of labels
- other minor adjustments
2018-08-30 11:45:47 +08:00
Coet
aea53c1833
Merge pull request #43 from FengZiYjun/master
New Trainer Initialization Interface
2018-08-24 09:47:40 +08:00
FengZiYjun
2df8eb740a Updates to core, loader:
- add Loss, Optimizer
- change Trainer & Tester initialization interface: two styles of definition provided
- handle Optimizer construction and loss function definition in a hard manner
- add argparse in task-specific scripts. (seq_labeling.py & text_classify.py)
- seq_labeling.py & text_classify.py work
2018-08-22 19:10:12 +08:00
Coet
ceac3f2e1f
Merge pull request #38 from FengZiYjun/new_updates
New updates
2018-08-22 10:18:46 +08:00
FengZiYjun
4c8c2dfdb8 updates to core, loader, test:
- move preprocess.py from loader/ to core/
- changes to interface of preprocess: 1. add run method, to run the main processing 2. add cross validation split 3. add return value 4. merge subclasses
- Trainer supports cross validation
- add data as arguments in Trainer.train & Tester.test
- add readme.example.py, to run the example program shown in README.md
- other corresponding changes
2018-08-19 16:21:14 +08:00
Coet
fc7dd7eced
Merge pull request #33 from FengZiYjun/master
Updates to cores, loader, saver
2018-08-18 16:50:45 +08:00
choosewhatulike
fb20e87321 add chinese word segmentation model 2018-08-17 00:07:38 +08:00
FengZiYjun
4bbeaebe96 Updates to cores, action, loader:
- rename Inference to Predictor
- rename Trainer.prepare_input to Trainer.load_train_data, load data_train.pkl only
- add __contains__ method to config Section class
- more code comments
- more elegant make_batch & data_iterator: Samplers return batch samples instead of batch indices
2018-08-15 20:12:20 +08:00
FengZiYjun
8e6db05339 changes to Trainer, Tester & Inference:
- rename "POSTrainer", "POSTester" to "SeqLabelTrainer", "SeqLabelTester"
- Trainer & Tester have NO relation with Action
- Inference owns independent "make_batch" & "data_forward"
- Conversion to Tensor & go into cuda are done in "make_batch"
- "make_batch" support maximum/minimum length
2018-08-08 20:40:44 +08:00
FengZiYjun
c1d7c5d7da changes to action, trainer and tester:
- rename "POSTrainer" to "SeqLabelTrainer"
- add text classification test data
- update make_batch in  Trainer and Tester
2018-08-07 19:18:56 +08:00
FengZiYjun
743a6d7547 fix bugs in preprocessor 2018-08-01 10:10:55 +08:00
FengZiYjun
ef8ec3b9e4 add cws train script and corresponding config file 2018-07-30 09:52:46 +08:00
FengZiYjun
242e576a30 changes to trainer, tester, preprocessor, etc.
- [tester][trainer] add cuda support
- [preprocess] fix label2index for padding label seq
- update README.md
- [test] add test_tester.py
- rename "action" to "core"
2018-07-28 11:57:25 +08:00
FengZiYjun
eb66cbe6c4 restructure module: 4 classes; add modules; move prototype and rename 2018-07-12 21:53:42 +08:00
FengZiYjun
7514be6f30 - add validation loss into trainer.train
- restructure: move reproduction outside
- add evaluate in tester
2018-07-11 21:51:35 +08:00
FengZiYjun
32652407df restructure files & add "modules" directory & add CRF.py 2018-07-01 10:39:36 +08:00
FengZiYjun
3e1d995b3c update file structures 2018-06-25 14:16:47 +08:00
FengZiYjun
58127d3c4e start building word seg (generally seq2seq) model 2018-05-30 22:28:22 +08:00
FengZiYjun
fdd26b8e58 add LICENSE, setup.py & requirements.txt 2018-05-25 18:32:02 +08:00
FengZiYjun
3081a57ef9 optimize trainer logic & prepare charlm test 2018-05-24 10:45:01 +08:00
FengZiYjun
6b357bec40 design intermediate controller between trainer and pytorch model 2018-05-23 17:48:26 +08:00
FengZiYjun
7b46f422c7 add base methods for model.base_model 2018-05-22 11:15:27 +08:00
FengZiYjun
4f71d44999 build classes for saver 2018-05-22 10:34:03 +08:00
FengZiYjun
6e1446beb1 first commit 2018-05-21 22:36:11 +08:00