Comments (11)
pytorch版本?
from cail2019.
不好意思,我手误了,是pytorch版本。
我这里想请问一下,我运行您的代码,其中未加上数据增广部分,运行之后准确率不升反降,其中我将epoch设置为15,bachsize设置为8,from_jsons()方法中use_augment参数设置为FALSE。运行结果如下
Epoch 1/15, Loss 0.6125234: 100%|██████████| 510/510 [07:00<00:00, 1.21it/s]
2020-11-19 12:04:18 - train model - INFO - Epoch 1, train Loss: 350.5714206, eval acc: 0.5009803921568627, eval loss: 87.9807581
Epoch 2/15, Loss 0.6267155: 38%|███▊ | 196/510 [02:41<04:14, 1.24it/s]Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 32768.0
Epoch 2/15, Loss 0.7077590: 51%|█████▏ | 262/510 [03:35<03:20, 1.23it/s]Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 16384.0
Epoch 2/15, Loss 0.6255577: 100%|██████████| 510/510 [07:00<00:00, 1.21it/s]
2020-11-19 12:12:03 - train model - INFO - Epoch 2, train Loss: 324.0322941, eval acc: 0.48627450980392156, eval loss: 89.3969226
Epoch 3/15, Loss 0.4028434: 100%|██████████| 510/510 [07:00<00:00, 1.21it/s]
2020-11-19 12:19:48 - train model - INFO - Epoch 3, train Loss: 277.1290905, eval acc: 0.4764705882352941, eval loss: 103.9318169
Epoch 4/15, Loss 0.3176420: 100%|██████████| 510/510 [07:00<00:00, 1.21it/s]
2020-11-19 12:27:33 - train model - INFO - Epoch 4, train Loss: 230.9418191, eval acc: 0.5107843137254902, eval loss: 125.9183470
Epoch 5/15, Loss 0.2223693: 100%|██████████| 510/510 [07:00<00:00, 1.21it/s]
2020-11-19 12:35:18 - train model - INFO - Epoch 5, train Loss: 189.8396636, eval acc: 0.49901960784313726, eval loss: 167.4459955
Epoch 6/15, Loss 0.8055249: 53%|█████▎ | 268/510 [03:40<03:15, 1.24it/s]Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 16384.0
Epoch 6/15, Loss 0.8786914: 62%|██████▏ | 316/510 [04:20<02:36, 1.24it/s]Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 8192.0
Epoch 6/15, Loss 1.0068855: 100%|██████████| 510/510 [06:59<00:00, 1.21it/s]
2020-11-19 12:43:02 - train model - INFO - Epoch 6, train Loss: 167.8786180, eval acc: 0.4852941176470588, eval loss: 195.0725200
Epoch 7/15, Loss 0.1222683: 100%|██████████| 510/510 [06:59<00:00, 1.22it/s]
2020-11-19 12:50:47 - train model - INFO - Epoch 7, train Loss: 144.5756744, eval acc: 0.49901960784313726, eval loss: 235.2725336
Epoch 8/15, Loss 0.0200045: 100%|██████████| 510/510 [06:59<00:00, 1.22it/s]
2020-11-19 12:58:31 - train model - INFO - Epoch 8, train Loss: 124.8573526, eval acc: 0.4950980392156863, eval loss: 284.8547707
Epoch 9/15, Loss 0.0241441: 100%|██████████| 510/510 [06:58<00:00, 1.22it/s]
2020-11-19 13:06:14 - train model - INFO - Epoch 9, train Loss: 110.4628077, eval acc: 0.5068627450980392, eval loss: 320.1884821
Epoch 10/15, Loss 0.3061803: 57%|█████▋ | 293/510 [04:01<02:59, 1.21it/s]
from cail2019.
“未加上数据增广部分,运行之后准确率不升反降”,这应该是预期现象,表明增广可以提高性能,这也是我在README说明中提到的,不知道你的疑问是什么呢?
from cail2019.
我的疑问就是,是否您在实验时有对比加数据增广和不加数据增广的实验效果?不加数据增广仅仅用bert实验效果如何?因为我不清楚我得到的实验结果是因为模型本身的原因还是因为我个人代码运行的错误,为何效果会如此差?似乎和预期bert的效果不太相符。
其次我这里想问一下,您训练得到您的实验结果epoch是设为了多少,我复现您的实验epoch设为10,得到最高准确率为0.7(这里是加入了数据增广),与您在README中提到的结果相差较多。
from cail2019.
补充一下,我复现您代码得到0.7准确率的结果,其中TRAINING_DATASET读取的是raw中的数据,但是K折教程验证中K设置为1,这样是否会影响实验结果?
from cail2019.
你好,我来测试下给您回复,我在readme中的结果是基于旧版代码做的,并且是TRAINING_DATASET为第一阶段数据集(主办方最后未公开分发该数据集),kfold=5。比赛最终成绩榜得分为0.7059。
from cail2019.
非常感谢您的回复!
from cail2019.
主要是看了你这个日志结果中loss不降反升,准确率0.5,我怀疑代码最后是不是引入了什么bug
from cail2019.
我也怀疑是我在看您代码改写信息增广部分是否有改动什么,所以我又重新下载了您的代码,未改动模型结构进行复现,就是我上面说的运行结果epoch9之后达到最高0.70490。(就是bachsize为8,epoch为9,k为1,training_dataset 为raw)
日志显示train_loss和test_loss都在下降,说明应该是我之前代码改动的问题。
其次我又尝试将training_dataset设为train中的input.txt,k为1,发现模型训练初始即epoch1准确率很低,仅仅为0.4862,(当training_dataset为rwa时,epoch1准确率为0.5725),且准确率提高慢,到epoch3时反而降了一些(epoch1=0.4862,epoch2=0.5098,epoch3=0.5029),是否training_dataset的选择也会影响模型的训练结果?
from cail2019.
问题找到了#20,原来是数据的问题,原始比赛数据集没有label
字段,默认label都是B,而最新下载的数据的label则由新增的label
字段决定。因此代码中关于数据加载部分得修改代码才行,不然基于错误的label训练,难怪准确率50%左右。
from cail2019.
5f8d901 已经修改代码适配最新数据集,准确率在0.5左右的问题不再存在。
from cail2019.
Related Issues (12)
- 软label HOT 2
- 你好,我用你的程序,跑出来,评分只有0.52。感觉差太远了。我只把epoch设成1,batch_size设成8.其它没变。 HOT 30
- 关于模型数据预处理及模型输入的问题? HOT 1
- 数据label问题 HOT 5
- 启发式增广的代码有错误 HOT 1
- 问下官方公开的数据集是第几阶段的啊 HOT 1
- 作者您好!请问我该如何下载pytorch版本的BERT预训练模型呢?不胜感激! HOT 2
- 使用数据增广后报错 HOT 2
- from apex import FP16 rasied errors HOT 6
- Prediction Acc is 0.533 when running main.py and judger.py HOT 4
- 5fold and 1fold experiment GAP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cail2019.