Coder Social home page Coder Social logo

Comments (3)

bojone avatar bojone commented on June 18, 2024

请仔细阅读
https://kexue.fm/archives/6933#%E7%AE%80%E5%8D%95%E8%AF%B4%E6%98%8E

from bert4keras.

echo-ray avatar echo-ray commented on June 18, 2024

天呐。。。太速度了,非常感谢您给的链接!

from bert4keras.

echo-ray avatar echo-ray commented on June 18, 2024

引用一下大佬博客里相关的部分

另外还有一个 keep_words,这个是用来精简 Embedding 层用的,对于中文Bert来说,总的tokens大概有2万个,这意味着最后预测生成的token时是一个2万分类问题。但事实上这大多数tokens都不会被使用到,因此这2万分类浪费了不少计算量。于是这里提供了一个选项,我们可以自行统计一个字表,然后传入对应的id,只保留这部分token,这样就可以降低计算量了(精简后一般只有5000个左右)。

from bert4keras.

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.