Comments (5)
修改了三处地方:
1、model\chinese-bert_chinese_wwm_pytorch\config.json, 其中vocab_size的值改为 30522
2、code\sqlnet\model\sqlbert.py,大约141行附近,增加三行:sel_col_mask = sel_col_mask - 254;where_col_mask = where_col_mask - 254;qcol_mask = qcol_mask - 254,程序才能跑起来
3、log日志的位置。code\sqlnet.utils.py文件,950行附近,save_error_case(error_case, gt_cases, dir='./log/')改为save_error_case(error_case, gt_cases, dir='../log/')
最终结果:
Train loss = 2.019
Dev Logic Form Accuracy: 0.732, Execution Accuracy: 0.747
Best Logic Form: 0.732 at epoch 29
Best Execution: 0.747 at epoch 29
Best Mean: 0.740 at epoch 29
Best val acc: (0.9993093922651933, 0.9882596685082873, 0.9861878453038674, 0.975828729281768, 0.9509668508287292, 0.9544198895027625, 0.8031767955801105)
On epoch individually (28, 28, 29, 20, 24, 28, 29)好像没有预期的高啊
谢谢老哥分享 , 第一处修改有点不懂 , 用的是哈工大讯飞的词表 , 跟bert一样是21128 , 为啥要改成30533呢?
from nl2sql.
修改了三处地方:
1、model\chinese-bert_chinese_wwm_pytorch\config.json, 其中vocab_size的值改为 30522
2、code\sqlnet\model\sqlbert.py,大约141行附近,增加三行:sel_col_mask = sel_col_mask - 254;where_col_mask = where_col_mask - 254;qcol_mask = qcol_mask - 254,程序才能跑起来
3、log日志的位置。code\sqlnet.utils.py文件,950行附近,save_error_case(error_case, gt_cases, dir='./log/')改为save_error_case(error_case, gt_cases, dir='../log/')
最终结果:
Train loss = 2.019
Dev Logic Form Accuracy: 0.732, Execution Accuracy: 0.747
Best Logic Form: 0.732 at epoch 29
Best Execution: 0.747 at epoch 29
Best Mean: 0.740 at epoch 29
Best val acc: (0.9993093922651933, 0.9882596685082873, 0.9861878453038674, 0.975828729281768, 0.9509668508287292, 0.9544198895027625, 0.8031767955801105)
On epoch individually (28, 28, 29, 20, 24, 28, 29)
好像没有预期的高啊谢谢老哥分享 , 第一处修改有点不懂 , 用的是哈工大讯飞的词表 , 跟bert一样是21128 , 为啥要改成30533呢?
30533是bert英文版本词表大小
from nl2sql.
修改了三处地方:
1、model\chinese-bert_chinese_wwm_pytorch\config.json, 其中vocab_size的值改为 30522
2、code\sqlnet\model\sqlbert.py,大约141行附近,增加三行:sel_col_mask = sel_col_mask - 254;where_col_mask = where_col_mask - 254;qcol_mask = qcol_mask - 254,程序才能跑起来
3、log日志的位置。code\sqlnet.utils.py文件,950行附近,save_error_case(error_case, gt_cases, dir='./log/')改为save_error_case(error_case, gt_cases, dir='../log/')
最终结果:
Train loss = 2.019 Dev Logic Form Accuracy: 0.732, Execution Accuracy: 0.747 Best Logic Form: 0.732 at epoch 29 Best Execution: 0.747 at epoch 29 Best Mean: 0.740 at epoch 29 Best val acc: (0.9993093922651933, 0.9882596685082873, 0.9861878453038674, 0.975828729281768, 0.9509668508287292, 0.9544198895027625, 0.8031767955801105) On epoch individually (28, 28, 29, 20, 24, 28, 29)
好像没有预期的高啊
第二点在133行 # do mask下面加
from nl2sql.
Related Issues (16)
- 我在run代码的时候出了这个错误:'Database' object has no attribute 'get_connection' HOT 3
- 关于原理
- 请教一下,train的时候为什么epoch设置到100,损失依然很高16.5,不收敛是什么情况? HOT 6
- For real industrial application, what strategy to locate the exact table?
- 求数据集,非常非常非常感谢! HOT 3
- 请问能够推断出结果么,就是得到sql查询后的结果
- 答辩ppt
- 能否提供数据链接 HOT 15
- title
- 数据集 HOT 7
- 有没有数据集可以提供一下?
- 能否提供数据集链接~
- 关于结果问题 HOT 18
- 数据集
- 技术交流
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 nl2sql.