Only one vector was return
chessgenius opened this issue · 2 comments
Dear author,
Only one vector was return if I use encode instead of multiple vector like other BERT.
For examples.
'''
from bert_serving.client import BertClient
bert_client = BertClient(port=5555, port_out=5556)
text = ["vô cùng đẹp trai", "đẹp trai thi mới có nhiều người yêu"]
x = bert_client.encode(text, show_tokens=False)
print(x.shape)
print(x)
'''
will return
'''
(2, 768)
[[ 0.2791622 0.38170967 -0.4323979 ... 0.5590598 -0.30385852
-0.21244307]
[ 0.2540159 0.1214181 -0.31108022 ... -0.07018693 -0.02891144
0.41919646]]
'''
instead of something like "23768" matrix
I was fixed it already. Thanks.
Thanks for your report !
Note that this project is originally created for deployment at local machine environments, not product environments, thus, in some cases, there are may be some hidden model/system bugs .
But feel free to use this code and carefully modify if needed.