Code Monkey home page Code Monkey logo

Comments (7)

Tongjilibo avatar Tongjilibo commented on May 17, 2024

Epoch 1/50
2000/2000 [==============================] - 193s 97ms/step - loss: 0.0078
Evaluation: 100%|█████████████████████████████████████████| 1159/1159 [00:32<00:00, 35.58it/s]
[val] f1: 0.90232, p: 0.92398 r: 0.88164

这是我本地跑的,你是用同样的数据集吗?也没有改动代码?

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 17, 2024

如果是使用你自己的数据集,不传入steps_per_epoch或者设置为None,表示跑一个完整的epoch,然后检查下数据处理部分代码,看看结果咋样?

from bert4torch.

zhangyujie209 avatar zhangyujie209 commented on May 17, 2024

我用的人民日报数据集,也没动过代码,在colab上跑的

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 17, 2024

我在colab上是可以跑起来的,如下截图,请检查你是否成功加载了预训练模型,或者先在本机调试下看看
微信截图_20220427191110

from bert4torch.

zhangyujie209 avatar zhangyujie209 commented on May 17, 2024

我感觉是BERT版本原因,作者大大使用的是哪个版本的BERT,我换了huggingface里的bert-base-chinese版本第一轮的还是0,第二轮以后开始慢慢提升,但是收敛速度很慢,到17轮F1到了93多

from bert4torch.

Tongjilibo avatar Tongjilibo commented on May 17, 2024

我感觉是BERT版本原因,作者大大使用的是哪个版本的BERT,我换了huggingface里的bert-base-chinese版本第一轮的还是0,第二轮以后开始慢慢提升,但是收敛速度很慢,到17轮F1到了93多

您好,是的,因为你用的bert-base-chinese的权重的key和本框架没有完全对齐,导致Laynorm层的权重和偏置未成功加载,可以使用转化脚本修改一下,本项目使用到的部分数据集下载链接直接加载的checkpoint清单

from bert4torch.

zhangyujie209 avatar zhangyujie209 commented on May 17, 2024

from bert4torch.

Related Issues (20)

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.