yh
a1a41c2d8b
1. unused报错运行错误修复
2. loss中修复一个错误
3. metric中fast_param调整
7 years ago
yh
1fb1df4a31
1. metric修改fast_param
2. trainer中update_every改为print_every, 因为update_every可能引起optimizer update的误解
3. fieldarray content支持使用np.ndarray初始化
7 years ago
yh
785c41ded5
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
# Conflicts:
# fastNLP/core/dataset.py
# fastNLP/core/trainer.py
# test/core/test_trainer.py
Trainer support print_train and tqdm train.
7 years ago
yh
beb55f5288
* change trainer iterating into tqdm
7 years ago
yunfan
1421b7dfba
add this feature totally for yh
7 years ago
yunfan
ad3c5b6ef0
add magic iter in dataset
7 years ago
FengZiYjun
513876d5db
Updates:
* fix losses的_fast_param_map的bug
* Trainer添加sampelr初始化参数,并调整参数顺序
* refine codes
7 years ago
yunfan
9c8ec45742
Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into dataset
7 years ago
yunfan
131e1ccd3b
add _fast_param_map
7 years ago
FengZiYjun
6f58ec34b4
Updates:
* DataSet修改__repr__,优化print(datset)的输出
* Instance修改__repr__,优化print的输出
* Optimizer优化传参提示
* Trainer去除kwargs参数
* losses.py加个参数
* 对应test code的修改
7 years ago
FengZiYjun
f62060339e
All tests pass. Ready to merge.
* 更新Loss的接口形参跟metric保持一致
* 添加对几种loss的测试
* embed_loader采用维度独立的方法采样
* 对应测试代码的修改
7 years ago
yh
9e3fd0fe4c
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
77f8ac77da
对trainer中check code的报错信息进行了增强;将tester中的output修改为pred_dict
7 years ago
FengZiYjun
cc440b5ed6
All tests pass.
* 更新测试代码,跑通所有测试,覆盖率65%
* refine代码规范和某些注释
* fix tester self.use_cuda未赋值先使用的bug
* 添加tutorial样例数据——tutorial_sample_dataset.csv
* 【unsolved】embed_loader在计算np.cov时遇到segmentation fault
7 years ago
yh
d4af19ec1f
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
88949ba1da
修改dataset.py的apply signature; batch当中增加num_batches属性; tester的format_eval_results修改; metric增加fast_evaluate_call机制
7 years ago
FengZiYjun
5824b7f4c7
跑通tutorial,修复一些bugs:
* dataset检查slice开始位置,确保结果不为空
* fieldarray检查content不为空
* optimizer接受的model params是一个generator,不能赋值
* code style refine
7 years ago
yh
b2e09b745e
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
d19850b397
* add _fast_call_evaluate mechanism in MetricBase
7 years ago
FengZiYjun
11c82ab2e7
跑通test_trainer.py,联调结束,准备发布
7 years ago
FengZiYjun
201f5109d6
Updates:
* improve Loss initialization interface
* improve test codes for trainer
7 years ago
yh
8dd73a9205
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
yh
234ceb6fa3
fix bug in MetricBase
7 years ago
FengZiYjun
125c2718e4
Update
* fix bug in DataSet.split
* fix bugs in FieldArray, to allow content as a list
* fix bug in losses check
* ...
7 years ago
yh
c2d2137500
bug fix in MetricAccuracy
7 years ago
yh
8d7d2b428c
initial test for AccuracyMetric
7 years ago
yh
50f1c28b74
metric bug fix
7 years ago
yh
a90a62ab9b
metric bug fix
7 years ago
yh
a05ffd31cd
trainer增加对evaluate结果的check
7 years ago
yh
f76851b982
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
FengZiYjun
d74901e037
Trainer Update:
* 添加初始化注释
* 从_better_eval_result中抽取check metrics的逻辑到_check_eval_results函数
7 years ago
FengZiYjun
fb5215ae73
fix bug in Trainer about metric_key
更新Optimizer: 多种初始化方法
1. SGD()
2. SGD(0.01)
3. SGD(lr=0.01)
4. SGD(lr=0.01, momentum=0.9)
5. SGD(model.parameters(), lr=0.1, momentum=0.9)
7 years ago
yh
84024aaaa4
_prepare_metric函数增加检查evaluate与get_metric方法
7 years ago
yh
bd94dd2c7f
metrics中实现AccuracyMetric, 并将metric的计算方式由一把计算修改为batch by batch
7 years ago
yh
f24fca1b21
change the calculation of metric to batch by batch. The older design is to concat all data before calculation.
7 years ago
yh
1b961f136c
conflict in trainer solved
7 years ago
yh
3daa889bb0
LossInForward update
7 years ago
yh
3a4a729314
trainer and tester change check_code
7 years ago
xuyige
ba7b17661c
Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into check
7 years ago
xuyige
6d36190be4
update LossBase class
7 years ago
FengZiYjun
8a7077fed2
更新Optimizer:
optimizer.SGD(lr=xxx);如果没有传入parameters,则在trainer中帮他加入parameter
7 years ago
FengZiYjun
08375d51b0
Merge remote-tracking branch 'FengZiYjun/trainer' into trainer
# Conflicts:
# fastNLP/core/trainer.py
7 years ago
FengZiYjun
e5e7f29d72
更新Trainer:
* 添加Trainer参数metric_key,指明用来做模型选择的指标的名字
* 在Trainer添加处理tester返回的评价指标的逻辑,选择当前最好的模型
7 years ago
FengZiYjun
e6864ea7e0
更新embed_loader:
* 添加fast_load_embedding方法,用vocab的词索引pre-trained中的embedding
* 如果vocab有词没出现在pre-train中,从已有embedding中正态采样
Update embed_loader:
* add fast_load_embedding method, to index pre-trained embedding with words in Vocab
* If words in Vocab are not exist in pre-trained, sample them from normal distribution computed by current embeddings
7 years ago
yh
0d4720b1d9
CheckError add function
7 years ago
yh
2c8bd9575a
add _method_function
7 years ago
xuyige
84eb50a810
Merge branch 'trainer' of https://github.com/FengZiYjun/fastNLP into check
7 years ago
yh
7c439e7a98
Merge branch 'trainer' of github.com:FengZiYjun/fastNLP into trainer
7 years ago
xuyige
37e282d324
update LossBase class
7 years ago
yh
ad0a8c1775
增加metric
7 years ago