Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Hi Rob, #21

Description

@NahumKorda

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions