Giter Site home page Giter Site logo

zylhub / bert-as-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jina-ai/clip-as-service

6.0 6.0 2.0 8.65 MB

Mapping a variable-length sentence to a fixed-length vector using BERT model

Home Page: https://bert-as-service.readthedocs.io

License: MIT License

Python 92.45% Dockerfile 0.10% Shell 1.03% JavaScript 2.69% HTML 3.27% CSS 0.46%

bert-as-service's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bert-as-service's Issues

bc.encode输出分类预测结果

默认情况下,bert-as-service提供句子的特征编码。如果期望提供分类预测结果呢?

参考此issues 修改代码 输出分类预测#213 How to get probability from a finetuned classify model

整体思路:

  1. 加载预训练模型的时候 加载分类层的权重和bias(⚠️不要添加初始化方法)
  2. 添加分类预测层
  3. 添加相关参数

如果在bert训练过程对模型有过修改,应该在 server/bert_serving/server/bert中替换为对应代码

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.