Giter Club home page Giter Club logo

Comments (5)

vdogmcgee avatar vdogmcgee commented on May 19, 2024

修改了三处地方:

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.

IAMZn1018 avatar IAMZn1018 commented on May 19, 2024

修改了三处地方:
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.

IAMZn1018 avatar IAMZn1018 commented on May 19, 2024

修改了三处地方:

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.