bert-utils icon indicating copy to clipboard operation
bert-utils copied to clipboard

一行代码使用BERT生成句向量,BERT做文本分类、文本相似度计算

Results 56 bert-utils issues
Sort by recently updated
recently updated
newest added

![0HF%$_O{LW{)4Z Z `NLF N](https://user-images.githubusercontent.com/16335913/55391744-8ce29800-556c-11e9-8563-f4ca3284f01a.png) ![GBI9 3~3V7 6BK8(SR96DVX](https://user-images.githubusercontent.com/16335913/55391754-91a74c00-556c-11e9-86c5-a306f5981ceb.png) ![{NJ@2(Z)GE)$EQ_7L@G 6_3](https://user-images.githubusercontent.com/16335913/55391764-97049680-556c-11e9-8898-25297f0bfe4d.png)

我的场景是两个文本的相似度,思路是:微调后,抽取的最后一层池化作为了句向量,用余弦来计算相似度。是768维的,效果还可以,后来因为有个需求需要降低到128维,我直接在768维后面接了一个全连接降到128维了。但是效果就不好了....是不是这种方式不可行?

![image](https://user-images.githubusercontent.com/69790778/117385608-030a1380-af18-11eb-81c8-f15d58460ce3.png)

下载预训练模型之后,跑了训练和检测, 在预测的时候,发现相同的两个句子相似度很低,毫不想干的两个句子相似度反而高

就是最大序列长度设置得太小,# 序列的最大程度,单文本建议把该值调小 max_seq_len =

tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [predictions must be in [0, 1]] [Condition x

出现 fail to optimize the graph! @@@的情况,请问是为什么呢@terrifyzhao