Commit Graph

279 Commits

Author SHA1 Message Date
yunfan
819c8f05be fix vocab 2018-09-19 15:10:18 +08:00
yunfan
9c7f3cf261 add vocabulary into preprocessor 2018-09-19 14:49:24 +08:00
yunfan
3f4544759d add unittest of data, fix bug 2018-09-19 14:49:24 +08:00
yunfan
466f3c21ec add vocabulary 2018-09-19 14:49:23 +08:00
Yunfan Shao
4d66bd6b9f
Merge pull request #81 from choosewhatulike/fixMLP
update MLP
2018-09-19 14:40:10 +08:00
Xipeng Qiu
1e1fbc0b2e
Merge pull request #80 from lyhuang18/docs
add new modules for core/
2018-09-18 17:38:06 +08:00
Xipeng Qiu
0b05be4301
Merge pull request #79 from 2017alan/master
self-attention module
2018-09-18 17:37:36 +08:00
yunfan
8f60a4fa01 update MLP 2018-09-18 15:57:44 +08:00
lyhuang
9fb6711bc4 add new modules for core/ 2018-09-18 13:44:19 +08:00
2017alan
8b859dc7b6 self-attention module 2018-09-17 22:14:01 +08:00
lyhuang18
f2850766b8
Merge pull request #5 from fastnlp/master
update
2018-09-17 20:45:17 +08:00
Xipeng Qiu
b46c4ba042
Merge pull request #76 from fastnlp/add_field_support
Introduce Field & DataSet to eliminate sub-trainers & sub-testers
2018-09-17 20:35:36 +08:00
Xipeng Qiu
bf5d1c347b
Merge branch 'master' into add_field_support 2018-09-17 20:35:17 +08:00
Xipeng Qiu
47772a88be
Merge pull request #74 from 2017alan/master
Add weight initialization for models.
2018-09-17 20:32:45 +08:00
Coet
ef3c753e0d
Update test_seq_label.py 2018-09-17 19:51:30 +08:00
FengZiYjun
ad044ef4c7 fix test path to pass py.test 2018-09-16 14:16:04 +08:00
FengZiYjun
f2fc98b5e6 add Field support in Predictor:
- apply DataSet in Predictor; remove sub-predictors; add "task" argument to specify which task to predict, as how Trainer/Tester did.
- remove Action class
- add helper function for DataSet, to create DataSet easily
- more code comments
- clean up unnecessary codes
- add unit tests for Batch, Predictor, Preprocessor, Trainer, Tester
2018-09-16 14:08:52 +08:00
FengZiYjun
05af2e7544 Introduce Fields concept to eliminate the use of different sub-trainers/sub-testers.
- update LabelField's to_tensor method to support int & str single label
- update preprocessor's convert_to_dataset method to support single label inputs
- introduce "task" in Trainer/Tester's data_forward, Tester's evaluate and metrics methods
- in cnn_text_classification.py, change the name of the argument of forward
- in sequence_modeling.py, change the name of the argument of forward
- minor adjustments in test codes
- text_classify.py works
2018-09-15 19:23:10 +08:00
Yige XU
5c671078b6
Update preprocess.py 2018-09-15 18:13:17 +08:00
2017alan
b3e8db74a6 add self_attention for yelp classification example. 2018-09-15 17:19:56 +08:00
2017alan
7bea47681b set encoding model utf-8,otherwise in some computer it will compile failed. 2018-09-15 17:18:51 +08:00
2017alan
a89875df1e add initial parameters 2018-09-15 17:17:22 +08:00
2017alan
5960aba9cb change the code to do with sentence with padding tokens. 2018-09-15 17:16:36 +08:00
2017alan
c24d01d50f fix a bug in label2index dict. 2018-09-15 17:15:25 +08:00
2017alan
8c13c28f0c add nll loss 2018-09-15 17:14:55 +08:00
lyhuang18
1ebb514aa3
Merge pull request #4 from fastnlp/master
update
2018-09-15 17:01:11 +08:00
FengZiYjun
758f0c0bd6 Introduce Field concept to optimize data representation.
- add DataSet, Instance, Field to represent data in different levels
- encapsulate batching method in Batch class
- modify samplers in action.py to fit Batch
- preprocessor.run returns DataSet, instead of list
- Use Batch in Trainer/Tester
- add required_arg "task" in Trainer/Tester
- remove SeqLabelTrainer/SeqLabelTester dependencies successfully. They empty classes to deprecate.
- modify SeqLabeling model, add another argument in forward, in order to compute mask inside model
- test\model\seq_labeling.py works
2018-09-15 16:48:59 +08:00
yunfan
bc04b3e7fd add basic Field support 2018-09-14 14:58:04 +08:00
Yunfan Shao
82502aa67d
Merge pull request #69 from choosewhatulike/format
format test folder
2018-09-14 14:53:37 +08:00
yunfan
4dfe7aaacc format test folder 2018-09-14 14:19:39 +08:00
lyhuang18
4846cfd9a8
Merge pull request #68 from lyhuang18/docs
add mathjax and update pictures
2018-09-12 17:18:46 +08:00
lyhuang
a521fdffd1 add mathjax and update pictures 2018-09-12 16:57:55 +08:00
lyhuang18
a5abee80a2
Merge pull request #3 from fastnlp/master
update
2018-09-10 09:19:07 +08:00
Coet
4bcfc5f930
Merge pull request #65 from xuyige/test_code
add config saver
2018-09-09 20:34:44 +08:00
xuyige
aac7982e93 fix a bug in config saver testing code 2018-09-09 17:57:09 +08:00
xuyige
6ddf5fcdcd update test code for testing config saver 2018-09-09 17:55:54 +08:00
xuyige
7138ff210f update config file for testing code, add more sections for testing. 2018-09-09 17:55:30 +08:00
xuyige
bbb02d0c1f clean up the code in config saver 2018-09-09 17:54:49 +08:00
xuyige
534bc67521 overwrite '==' operator and '!=' operator in ConfigSection class 2018-09-09 17:53:32 +08:00
xuyige
66b471c7fb Merge remote-tracking branch 'origin/test_code' into test_code 2018-09-09 16:27:04 +08:00
xuyige
48c1e8700b fix code style of config saver 2018-09-09 16:26:16 +08:00
Coet
7567053d76
Merge pull request #66 from lyhuang18/test2
add requirements: tensorboardX
2018-09-09 15:34:37 +08:00
lyhuang
a7fa63a0db add tensorboardX 2018-09-09 14:11:47 +08:00
lyhuang
6a77731d86 add tensorboardX 2018-09-09 14:08:05 +08:00
Yige XU
be2f4aade3
Merge branch 'master' into test_code 2018-09-09 12:46:11 +08:00
xuyige
12f06d09d2 clean up code in test loader 2018-09-09 12:39:47 +08:00
xuyige
7fb2bcc78c update config loader 2018-09-09 12:36:56 +08:00
xuyige
7c57bc6fc9 fix a bug for config saver 2018-09-09 12:32:39 +08:00
xuyige
58ccb6576f clean up codes 2018-09-09 12:30:33 +08:00
xuyige
476988573b add test code for testing config saver 2018-09-09 12:13:42 +08:00