Comments (2)
默认就是带增广的,你的修改会导致测试集也被增广从而bug。至于准确率问题,我测试过准确率第一轮就能达到0.64了。
$ python train.py
2021-06-21 16:02:14 - train model - INFO - 算法:BertForSimMatchModel
2021-06-21 16:02:15 - train model - INFO - ***** Running training *****
2021-06-21 16:02:15 - train model - INFO - dataset: data/train/input.txt
2021-06-21 16:02:15 - train model - INFO - k-fold number: 1
2021-06-21 16:02:15 - train model - INFO - device: cuda n_gpu: 2
2021-06-21 16:02:15 - train model - INFO - config: {
"batch_size": 12,
"epochs": 2,
"fp16": false,
"fp16_opt_level": "O1",
"learning_rate": 2e-05,
"max_grad_norm": 1.0,
"max_length": 512,
"warmup_steps": 0.1
}
2021-06-21 16:02:23 - train model - INFO - ***** fold 1/1 *****
2021-06-21 16:02:23 - train model - INFO - Num examples = 22372
2021-06-21 16:02:23 - train model - INFO - Batch size = 12
2021-06-21 16:02:23 - train model - INFO - Num steps = 3728
0%| | 0/1864 [00:00<?, ?it/s]/home/padeoe/.conda/envs/cail2019/lib/python3.6/site-packages/torch/nn/parallel/_functions.py:61: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
warnings.warn('Was asked to gather along dimension 0, but all '
Epoch 1/2, Loss 0.1356069: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1864/1864 [23:56<00:00, 1.29it/s]
2021-06-21 16:26:52 - train model - INFO - Epoch 1, train Loss: 753.5464908, eval acc: 0.6411764705882353, eval loss: 128.8568891
Epoch 2/2, Loss 0.0062600: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1864/1864 [23:54<00:00, 1.31it/s]
2021-06-21 16:51:21 - train model - INFO - Epoch 2, train Loss: 430.4074954, eval acc: 0.6735294117647059, eval loss: 153.7522663
2021-06-21 16:51:23 - train model - INFO - ***** Stats *****
2021-06-21 16:51:23 - train model - INFO - acc for each epoch:
2021-06-21 16:51:23 - train model - INFO - epoch 1, mean: 0.64118, std: 0.00000
2021-06-21 16:51:23 - train model - INFO - epoch 2, mean: 0.67353, std: 0.00000
2021-06-21 16:51:23 - train model - INFO - ***** Training complete *****
我用的google/bert的预训练模型,参见 #24 ,推测是你的预训练模型有问题,之前就有人用 OpenCLaP 的 bert 出现问题,参见
#8
from cail2019.
我是从您给我的链接这里下载的
https://huggingface.co/bert-base-chinese/tree/main
可能还是和google/bert的预训练模型不一样,我尝试自己转换一下,谢谢啦!
from cail2019.
Related Issues (12)
- 软label HOT 2
- 你好,我用你的程序,跑出来,评分只有0.52。感觉差太远了。我只把epoch设成1,batch_size设成8.其它没变。 HOT 30
- 关于Bert模型加载? HOT 11
- 关于模型数据预处理及模型输入的问题? HOT 1
- 数据label问题 HOT 5
- 启发式增广的代码有错误 HOT 1
- 问下官方公开的数据集是第几阶段的啊 HOT 1
- 作者您好!请问我该如何下载pytorch版本的BERT预训练模型呢?不胜感激! 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.