Questions tagged [djl]

Deep Java library: an open source library to build and deploy deep learning in Java

Open source library to build and deploy deep learning in Java - https://djl.ai/

30 questions
2
votes
1 answer

UnsatisfiedLinkError: no pytorch_jni in java.library.path

I am trying to load a pytorch model file, model.pt, that I trained into my Java Spring Boot application by using the DJL Framework on Windows 11. After adding all the dependencies and writing my RestController and running the application I get…
2
votes
1 answer

Which Java class is compatible with python Pandas DataFrame when using DJL(Deep Java Library)?

I'm trying to import Python Tensorflow custom model to spring-boot using DJL Tensorflow, and the model gets Pandas DataFrame as both input and output. I'm wondering if there is any particular table or dataFrame class that is applicable for…
1
vote
1 answer

Pytorch runtime not included when project is built as a jar

We have our ONNX model, and we're trying to use it in our app. Running the project from the IDE works just fine, but running the jar file produces this error. We debugged this issue and found that the supportedEngines in IDE runtime includes…
HishamGarout
  • 1,743
  • 3
  • 11
  • 12
1
vote
0 answers

Deep Java Library (DJL) - logical AND classification

I am trying to build a simple neural network to represent a logical AND. As I am new to machine learning and the Deep Java Library I was following the beginner tutorial: https://docs.djl.ai/jupyter/tutorial/01_create_your_first_network.html The…
Philipp S
  • 141
  • 1
  • 6
1
vote
1 answer

AI DJL No deep learning model found in karaf application

I am trying to use AI DJL pytorch package inside ONOS karaf application. I tried including the dependencies as bundles for the karaf build. I am able to run ai djl pytorch model outside karaf application without any errors, but there is some issues…
1
vote
1 answer

How do I use Pytorch models in Deep Java Library(DJL)?

I would like to run EasyNMT in Java. However I don't know how to load and run the model. I loaded the model as follows: URI uri = new URI("file:////Users/.../prior.pth"); Path modelDir = Paths.get(uri); Model model = Model.newInstance("model.pth",…
zenzenzenone
  • 169
  • 1
  • 1
  • 9
1
vote
1 answer

Create DockerFile using fabric8 that copies shared libraries

I am trying to run DJL(Deep java library) within an application on my Kubernetes Cluster( Debian 11 nodes). I am using fabric8 and maven to dynamically create my DockerFile this is what generated so far: FROM amazoncorretto:11-alpine-jdk EXPOSE…
Jeryl Cook
  • 989
  • 17
  • 40
0
votes
0 answers

"Method 'forward' is not defined." when running OpenAI Whisper model in DJL example in GPU

When I run the openai whisper example from the DJL demo, on a GPU, I'm getting this error: Caused by: ai.djl.engine.EngineException: Method 'forward' is not defined. at ai.djl.pytorch.jni.PyTorchLibrary.moduleRunMethod(Native Method) at…
0
votes
1 answer

forwarded value different between python and DJL

I see example https://docs.djl.ai/jupyter/load_pytorch_model.html I made my own torchscript witch named qooModel.pt file and synset.txt I tried to imitate the example. Here is my code. val translator = ImageClassificationTranslator.builder() …
Romeo RKPK
  • 11
  • 1
0
votes
1 answer

org.apache.flink.runtime.rpc.exceptions.RpcLoaderException: Could not load RpcSystem

Im trying to run this example Sentence Encoder with apach flink v. 1.17.0 But when i start app i get error Exception in thread "main" org.apache.flink.runtime.rpc.exceptions.RpcLoaderException: Could not load RpcSystem. at…
0
votes
0 answers

How to use DialoGpt with DJL

I need the use pre-trained model of DialoGpt but with Java. Could you provide me a code sample. It's not necessary to use only DJL, you can use every Java-written library. I've tried to copy Python code to Java according to the code sample at the…
0
votes
0 answers

DJL "No matching model with specified Input/Output type found." using "dbmdz/electra-large-discriminator-finetuned-conll03-english" model

I can't seem to figure out how to find out the input/output of a model from huggingface, specifically "dbmdz/electra-large-discriminator-finetuned-conll03-english". I keep getting the following error: Exception in thread "main"…
essm21
  • 1
  • 1
0
votes
0 answers

DJL build my own model for Questions and Answers

I want to build a simple java application using DJL that is first trained on a relatively large number of text documents. Then I want to model to be saved. After this I want to be able to answer multiple questions that will be answered based on the…
0
votes
1 answer

How to use Pretrained Hugging face all-MiniLM-L6-v2 mode using java Deep Java Library

How to use Pretrained Hugging face all-MiniLM-L6-v2 mode using java. Was able to load the model but facing issues when predicting.Tried writing a custom translator with String input and float output but didnt work .Any examples with Translator would…
Dinesh
  • 11
0
votes
1 answer

Error when trying to train Deep Java Library neural Network with an Image folder Dataset

With this code: public class Train { public static void main(String[] args) throws IOException, TranslateException { …
Dragon
  • 1
  • 3
1
2