easy-bert icon indicating copy to clipboard operation
easy-bert copied to clipboard

Hi Rob,

Open NahumKorda opened this issue 5 years ago • 0 comments

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.

NahumKorda avatar Nov 06 '20 18:11 NahumKorda