Code Monkey home page Code Monkey logo

Comments (4)

mar-muel avatar mar-muel commented on June 17, 2024

Dear HHansi

Thanks for looking into this. I've tried this and also got stuck at the same place. I think I found that the script only works for models trained with the original bert implementation (found here) and not with the TF2.x implementation. Converting our model to PyTorch is very high on my todo-list though. The script can still be used, one just has to adapt to the new variable names in BERT TF2.x. Let me know if you find a suitable script - PRs are always welcome ofc 😄

from covid-twitter-bert.

HHansi avatar HHansi commented on June 17, 2024

Dear mar-muel,

Thank you for your response.
I'll let you know if I could find a solution.

from covid-twitter-bert.

mar-muel avatar mar-muel commented on June 17, 2024

Hi Hansi

Just to let you know that I have now converted the model into a native PyTorch model (I wrote my own script, see here, if you're interested).

You can now use our model like any other model, e.g.:

from transformers import BertForPreTraining

model = BertForPreTraining.from_pretrained('digitalepidemiologylab/covid-twitter-bert')

Hope this helps!

from covid-twitter-bert.

HHansi avatar HHansi commented on June 17, 2024

Hi Martin,

Thank you very much.
This really helps a lot.

from covid-twitter-bert.

Related Issues (17)

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.