XLNet encoding issue
harrypb opened this issue · 1 comments
Please consider the following code.
from embedding_as_service.text.encode import Encoder
en = Encoder(embedding='xlnet', model='xlnet_base_cased', download=True)
vecs = en.encode(texts=["hello, how are you?"])
The above code gives the following error. I'm using python 3.6 (I've run using spyder)
ValueError: Trying to share variable model/transformer/r_w_bias, but specified shape (12, 12, 64) and found shape (24, 16, 64)
By the way, I'm able to generate the embeddings through bert.
Thanks,
Hari
The code seems fine.
I wasn't able to reproduce this error though. The setting you are trying to use is a default, where it should share the bias variable. I tried it on CPU, GPU, and TPU runtimes.
Can you share your tensorflow
and keras
versions?
Also whether you were using CPU or not?