Comments (3)
请仔细阅读
https://kexue.fm/archives/6933#%E7%AE%80%E5%8D%95%E8%AF%B4%E6%98%8E
from bert4keras.
天呐。。。太速度了,非常感谢您给的链接!
from bert4keras.
引用一下大佬博客里相关的部分
另外还有一个 keep_words,这个是用来精简 Embedding 层用的,对于中文Bert来说,总的tokens大概有2万个,这意味着最后预测生成的token时是一个2万分类问题。但事实上这大多数tokens都不会被使用到,因此这2万分类浪费了不少计算量。于是这里提供了一个选项,我们可以自行统计一个字表,然后传入对应的id,只保留这部分token,这样就可以降低计算量了(精简后一般只有5000个左右)。
from bert4keras.
Related Issues (20)
- NER实体识别的问题,能否指定单个标签只对应单个实体,或者说想要实现这种方式要如何处理比较好
- task_question_answer_generation_by_seq2seq.py 修改成多gpu报错 HOT 1
- 多任务学习要如何固定输出层的参数 HOT 2
- model.save() 保存模型时报错 HOT 1
- 4080显卡适配问题,failed to run cuBLAS routine: CUBLAS_STATUS_EXECUTION_FAILED HOT 1
- CPU环境下,bert4keras加载大小模型生成向量的时间差不多,并不能通过更换小模型解决性能问题,求问。 HOT 2
- where is the function "_set_hyper" in class LionV2 HOT 5
- 利用OpenVINO进行模型转换时报错 HOT 1
- Contrastive Search解码策略
- module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
- 关于复用keras_bert训练后的模型
- tensorflow.python.framework.errors_impl.OpError
- 'Tokenizer' object has no attribute '_token_pad_id'
- 'Tokenizer' object has no attribute '_token_pad_id' HOT 2
- 在对bert4keras加载的模型进行人工特征输入时出现问题,
- bert4keras/examples /task_relation_extraction.py HOT 1
- 可否在readme添加下bert4torch的链接 HOT 2
- recompute_grad 和 dropout问题
- File path error
- mac pip 包和包之间不协调 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bert4keras.