-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segment_ids 有什么用呢 #484
Comments
bert的返回值是没有的,bert的输入值有啊,这就是bert自带的设计,初衷是想要区分两个拼接的句子。 |
请问苏神bert4keras最高就支持tensorflow2.3以下版本吗 |
token_ids, segment_ids = tokenizer.encode(d['text'], maxlen=maxlen)
这句代码中返回值中的segment_ids,我分析了一下源码,大概是这个意思,句子A和句子B分隔符,句子A对应的全为0,句子B对应的全为1。但是不知道有什么用,可能我问的问题比较肤浅(´・_・`),之前用huggingface里面的bert,返回值貌似是没有这项的。
The text was updated successfully, but these errors were encountered: