Skip to content
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

Hi Rob, #21

Open
NahumKorda opened this issue Nov 6, 2020 · 0 comments
Open

Hi Rob, #21

NahumKorda opened this issue Nov 6, 2020 · 0 comments

Comments

@NahumKorda
Copy link

NahumKorda commented Nov 6, 2020

I am trying to run your code using one of the Maven models, but when I try to create the embeddings I get the following error:

Exception in thread "main" java.lang.NoSuchMethodError: org.tensorflow.Tensor.create([JLjava/nio/IntBuffer;)Lorg/tensorflow/Tensor;
at com.robrua.nlp.bert.Bert$Inputs.(Bert.java:98)
at com.robrua.nlp.bert.Bert.getInputs(Bert.java:431)
at com.robrua.nlp.bert.Bert.embedTokens(Bert.java:353)

The following is the code that causes the error:
try(Bert bert = Bert.load("com/robrua/nlp/easy-bert/bert-uncased-L-12-H-768-A-12")) {
float[][] embedding = bert.embedTokens("Hello World.");
}

What should I do to get these embeddings?
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant