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
Doubt: Can I use this service to obtain docvecs/Paragraph vector of an entire article #232
Comments
Hi, Currently what I have decided to do is set This is due to the fact that, in https://github.com/google-research/bert/blob/master/modeling.py#L43 |
I don't think this is the expected use of BERT. BERT is a network trained at the sentence embedding level, thus the representation of more than one sentence should be pretty inaccurate and the computation needed beyond 512 tokens would be huge (remember, the computation isn't linear to the number of tokens). There's many strategies for you to try if you want a more accurate paragraph representation, for example:
|
length restriction on the server side can now be waived in 1.8.2. This issue is fixed in #236 and the new feature is available since 1.8.2. Please do pip install bert-serving-client bert-serving-server -U for the update. You can now set You may also want to check the new argument |
@ironflood The averaging technique sounds interesting! Could you please point me to the results if this has been tried by anyone? |
Hi all,
I am trying to obtain fixed length doc vectors/ Paragraph vectors with this implementation. As mentioned in docs I can increase
max_seq_len
from 25 to the desired length and pass my article as input. I want to know if this approach is right or is there a downside to it. Also, is there another better approach to obtain docvecs using Bert Model?Currently, we use gensim library to obtain docvecs for an article. Another approach could be to use word vecs obtained from bert model, one hot encode paragraph ids and obtain its vector (similar to gensim paragraph vec implementation).
What do you guys suggest?
Prerequisites
bert-as-service
?README.md
?README.md
?System information
bert-as-service
version:Description
I'm using this command to start the server:
and calling the server via:
Then this issue shows up:
...
The text was updated successfully, but these errors were encountered: