Coder Social home page Coder Social logo

bert-text's Introduction

BERT+ TF Keras For NLP Tasks

说明:本项目处于开发阶段,暂时不可用

简介:以Tensorflow的Keras的Bert预训练模型开发NLP的各种任务。

项目特点

  • 下载稳定,较为典型的测试数据,附带详细介绍
  • 数据接口封装,减少数据的处理工作
  • 模型采用tf.keras完成,方便快捷不失灵活
  • 方便的保存模型和部署

环境

  • Tensorflow:1.13.1
  • Tensorflow-hub

TODO List

句子向量化

  • 性能测试
  • Batch输入

文本分类

  • 二分类任务

已完成。数据量不大的情况下可以不使用微调,否则参数量增大可能会过拟合。

  • 多分类任务 BERT的多分类任务和二分类类似,只需要修改标签,然后sigmod换softmax,损失函数也换成多分类交叉熵即可。目前没有稳定的外链数据,所以没写example。
  • 多标签任务

序列标注

  • NER

开发中

阅读理解

  • 斯坦福SQUAD类似的中文检索式阅读理解

未完成

模型保存和部署

  • h5转saved_model。
  • 最好的方式是可以使用tf.keras.experimental.export_saved_model导出模型,然后直接使用TF serving部署。

TF Data输入

  • 多输入的TF Data写法
  • GPU利用率的比较

其他计划

  • Windows测试

其他说明

  • 为什么用tf.keras而不是keras tf.keras成为TF2.0的主要模式,由TF团队开发,支持更多TF的特性包括tf.data以及tf serving,TF2.0出了之后项目会迁移到TF2.0,而keras已经较长时间没有重大更新了,所以tf.keras是更好的选择。

参考项目

bert-text's People

Contributors

sunyancn avatar

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.