easy-bert
easy-bert copied to clipboard
Hi Rob,
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.
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.