ZhuiyiTechnology / WoBERT

以词为基本单位的中文BERT
Apache License 2.0
460 stars 70 forks source link

字embedding生成词embedding这一步的代码在哪? #6

Open svjack opened 3 years ago

svjack commented 3 years ago

‘ 然后用字embedding的平均作为词embedding的初始化’ 平均这一步在源码的哪里?

bojone commented 3 years ago

内置在bert4keras中 https://github.com/bojone/bert4keras/blob/270a8bb43a8a6c00ba9074f9f9f508df2ff1642a/bert4keras/models.py#L234