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
0
votes
1 answer

Deep Java Library: How to use solr index to answer the question?

We are exploring Deep Java Library for Question & Answer application as mentioned in this link http://djl.ai/examples/docs/BERT_question_and_answer.html public static String predict() throws IOException, TranslateException, ModelException { // …
user989010
  • 137
  • 1
  • 16
0
votes
1 answer

Deep Java Library - NDArray set method does not allow modification of existing array

I've started using the Deep Java Library together with its underlying array manipulation package: ndarray. The question is very simple. I want to modify the i-th element of an existing NDArray, however I cannot do that. How can I set the i-th…
0
votes
1 answer

How to fix ai.djl.engine.EngineException incompatible attr in node at 1-th input: expected int32, got float32

I started to Deep learning with Deep Java Library (DJL) and Spring boot. When I train my dataset I got this error ai.djl.engine.EngineException: MXNet engine call failed: MXNetError: Check failed: assign(&dattr, vec.at(i)): Incompatible attr in node…
0
votes
1 answer

How do I add a Maven dependency in VS Code for a simple Java project (i.e. an unmanaged folder without any build tools)?

I'm trying to build an AI model for the Mario-AI-Framework using the Deep Java Library (DJL). I'm using VS Code with the Java extension, as this is part of a larger project, mainly in Python. Now I have a Pytorch model trained and ready to go but I…
0
votes
1 answer

train a model with djl

Good evening ! I'm starting with DJL. My code source is here https://github.com/ngandji/green_anthill.git someone can tell what is wrong in my code! I learn with this https://github.com/deepjavalibrary/djl/tree/master/jupyter/tutorial tutorial. the…
0
votes
1 answer

DJL GradientCollector Try With Resources Initialiser Error

I am trying to initialise two GradientCollectors for a card game AI. I am currently experiencing the following error: java.lang.IllegalStateException: Autograd Recording is already set to True. Please create autograd using try with resource at…
Aidan L
  • 1
  • 1
0
votes
1 answer

ai.djl.engine.EngineException: PytorchStreamReader failed locating file constants.pkl: file not found

I tried to use DJL to load the Yolov5 model for target recognition, but an error was reported. ai.djl.engine.EngineException: PytorchStreamReader failed locating file constants.pkl: file not found at…
0
votes
2 answers

Path for loading PyTorch model in Java with DJL

I trained a custom PyTorch model and saved it as a .pt file. I'm now trying to load this model in Java using DJL. Path modelDir = Paths.get("/Users/myname/eclipse-workspace/myProject/src/ML/"); Model model =…
David Papp
  • 119
  • 1
  • 10
0
votes
1 answer

Pytorch Djl java loading exception

I am running a Flink job in standalone deployment mode that uses Java djl to load a pytorch model. The model gets successfully loaded and I am able to cancel the job through Flink Rest API. However, when I try to launch the flink job once again, it…
Vim
  • 71
  • 3
0
votes
1 answer

Getting exception when code runs but no when code is being debugged on DJL

I am using DJL as a wrapper library for Numpy in Java to perform complex operations on matrices and I am having issues while trying to perform an NDArray#any() call. I am creating a matrix from a serie of operations and then I want to test if it…
sbd2
  • 79
  • 1
  • 11
0
votes
1 answer

How to setup AI in springboot kotlin poject

I want to use Deep learning java lib in my project. But I am not able to setup AI DJL in my spring boot kotlin Gradle based project. I Use Buildgradle.kts , but I don't know how to add ai.djl in buildgradle.kts.
Mama
  • 475
  • 1
  • 10
  • 26
0
votes
1 answer

not able to use ai.djl.modality.cv.util.BufferedImageUtils in my application

I am new to AI technology .I dded every DJL which are required to my project . But when I go to use ai.djl.modality.cv.util.BufferedImageUtils. I am not able to import it in my project.It show me an error create local…
Mama
  • 475
  • 1
  • 10
  • 26
0
votes
1 answer

How to call a custom mxnet operator in DJL (Deep Java Library)?

How do I call a custom mxnet operator from DJL? E.g. the my_gemm operator from the examples.
Christoph Henkelmann
  • 1,437
  • 1
  • 12
  • 17
0
votes
1 answer

How to determine the available GPU memory in Deep Java Library (DJL)?

Is there a way to query the maximum total memory on a GPU in DJL? E.g. an NVIDIA 1080ti should return a value of 11GB. I am working with the mxnet engine, but an engine-agnostic solution would of course be preferable.
Christoph Henkelmann
  • 1,437
  • 1
  • 12
  • 17
-1
votes
1 answer

Whisper Zoo model on DJL with GPU: Getting error "c10::intrusive_ptr::operator->() const+0xc"

I'm trying to run the Whisper zoo model from DJL examples in GPU. In the first run, I got the error that two devices were found - Cuda and CPU. As I understood that this error occurs due to just the model being in the GPU and not the input, as a…
1
2