Questions tagged [dl4j]

Deeplearning4j is the first commercial-grade, open-source, distributed deep-learning library written for Java and Scala

About

Deeplearning4j is the first commercial-grade, open-source, distributed deep-learning library written for Java and Scala. Integrated with Hadoop and Spark, DL4J is designed to be used in business environments, rather than as a research tool.

Links

208 questions
1
vote
3 answers

How to convert INDArray to Json in java?

INDArray image = loader.asMatrix(file); How to convert INDArray to Json String and from Json String to INDArray. I searched in google it is not showing any results recording this.
Murali krishna
  • 823
  • 1
  • 8
  • 23
1
vote
1 answer

How to explicitly free memory that was used by native code in Java/Android

I'm using DL4J in my Android project to run a CNN network as classifier. The problem is that this CNN model occupies more memories than the allowed per application heap size of my smartphone, which leads to out of memory error. So, I'm wondering if…
Hang
  • 319
  • 2
  • 15
1
vote
0 answers

DL4J transitional probability matrix in Word2vec

In DL4J, how to calculate transition probability (E.g. In word2vec, between two words) which leads to probability matrix (set of words)?
1
vote
1 answer

ND4J Shared library can not be find in Android project

I'm working on this Android project that need both OpenCV and DL4J. But there is this conflict btw the two during dynamic linking. In my app/src/main/jniLibs: I have to include arm64-v8a folder which has file libopencv_java3.so. However, now this…
Hang
  • 319
  • 2
  • 15
1
vote
1 answer

DL4J: How to calculate semantic similarity between two new sentences using GoogleNews vector

I am just going through basic tutorials for DL4J. And I am planning to compare similarity between two unseen sentences. I used a simple example to compare 2 words once W2V is done using GoogleNews-vectors-negative300.bin.gz. When I tried using…
Om Sao
  • 7,064
  • 2
  • 47
  • 61
1
vote
1 answer

How to Configure Neural Network to Produce Multiple Binary Outputs in DL4J

I am learning DL4J, and I would like to configure a network that can accept a tuple of double values, and produce a tuple of binary values, in which multiple of them may be set to 1, and others set to 0. In the language of neural nets, would I cal…
mobiusinversion
  • 343
  • 1
  • 6
  • 17
1
vote
5 answers

DL4J UnsatisfiedLinkError: no jniopenblas in java.library.path

I tried to set up a deeplearning4j project via gradle, but I get an UnsatisfiedLinkError: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopenblas in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) …
Sebastian
  • 5,721
  • 3
  • 43
  • 69
1
vote
1 answer

Implementation of image pre-processing methods on android

Could you please suggest a library (or a snippet) to implement pre-processing Python methods (e.g. numpy.expand_dims() or img_to_array) on Android API 18 (to deploy an app based on TensorFlow Mobile)? There are analogous libraries to Python on Java…
A. Gimal
  • 15
  • 4
1
vote
0 answers

how to use ReLu unit and get output in dl4j

I'm trying to make AutoEncoder in dl4j. Input: 200 integers range from 0 ~ approx 40000. code for model: MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder() .seed(seed) .iterations(ITERATIONS) …
user2659088
  • 133
  • 1
  • 7
1
vote
2 answers

java.lang.NoSuchFieldError: HALF Error with DL4J

Upon executing the MNIST example in my own project I get the following errors: o.n.l.f.Nd4jBackend - Loaded [CpuBackend] backend Exception in thread "main" java.lang.NoSuchFieldError: HALF at…
bossman
  • 340
  • 2
  • 17
1
vote
0 answers

Trying to run an app using dl4j on Android

I am trying to run a simple app using the deep learning library dl4j. I am working on Android Studio and using Gradle. During runtime, I get the following exception: 08-15 13:23:00.601 4868-4868/com.mi.dl E/AndroidRuntime: FATAL EXCEPTION: main …
faraopera
  • 39
  • 3
1
vote
1 answer

Using DL4J for Evaluating an Image kind of like in AlphaGo

I recently downloaded Deeplearning for Java (DL4J) and am now experimenting a bit with convolutional nets. I found some working samples on the homepage and the internet, for example how to classify images, i.e. recognizing faces. I understand…
Gemini
  • 475
  • 3
  • 12
1
vote
0 answers

How to get text paragraph dl4j neural networking

I'm working deeplearning4j and not understand how to get text paragraph of vector classified from the neural network. I could only get classification rate. This is my code: public static void main(String[] args) throws Exception { …
Renan Lalier
  • 671
  • 2
  • 7
  • 13
0
votes
2 answers

Deeplearning4J RNN Training : Exception 3D input expected to RNN layer expected, got 2

with the following code (tweaked for hours with different params), I keep getting an exception java.lang.IllegalStateException: 3D input expected to RNN layer expected, got 2 What I am trying to accomplish is to train a RNN to predict the next value…
0
votes
1 answer

How to update the weights in my q-network (deeplearning4j)

I want to create a deep q network with deeplearning4j, but can not figure out how to update the weights of my neural network using the calculated loss. (i was mainly following this Artical) public class DDQN { private static final double…