Git Product home page Git Product logo

fbbc's Introduction

FBBC is abbreviation of Feature-Based BERT Classifier, and it is easy to adapt to other tasks with few changes.

How to use

  1. Refactor DataProcessor to fit your task.
  2. run following command as BERT does
    python simple_classifier.py --do_train=true --do_eval=true\
        --data_dir=YOUR_DATA_PATH --bert_config_file=CONFIG_PATH\
        --vocab_file=VOCAB_PATH --output_dir=OUTPUT_MODEL
    
    if you want to fine-tune BERT model, add arg --finetune=true
  3. if you want to check a model is frozen or finetune, run
    python check_fintuned.py --raw_ckpt=BERT_MODEL_PATH --trained_ckpt=YOUR_MODEL_PATH
    

How it works

  • simple_classifier.py

    In this code we can choose how to use pre-trained BERT model. Notice there is a finetune flag default by false which means this classifier uses BERT as feature-based model like ELMo. We can also set it to true just like the paper does.

    Another thing is we simplify the processors here.

  • optimizeation.py

    We set trainable variables in this code. We use bert as keyword to filter BERT variables out, so you should name your variables without bert in it.

fbbc's People

Contributors

zizhenwang avatar

Watchers

 avatar  avatar  avatar

Forkers

luhg

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.