Questions tagged [deeplearning4j]

Deeplearning4j is 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.

Deeplearning4j is a deep learning programming library written for Java and the Java virtual machine (JVM) and a computing framework with wide support for deep learning algorithms (such as Boltzmann machine, deep belief net, deep autoencoder, stacked denoising autoencoder and recursive neural tensor network, word2vec, doc2vec, and GloVe).

These algorithms all include distributed parallel versions that integrate with Apache Hadoop and Apache Spark.

For more information: deeplearning4j site, source code, support forum

Related Tags:

413 questions
0
votes
1 answer

Get input and output size for each layer in deeplearning4java

How to fetch the layer input and output size in dl4j ? For example, something like this : MultiLayerNetwork network = model.init() for(Layer layer : network.getLayers()) { int[] outputShape = layer.shape() }
0
votes
1 answer

DL4J: Wrong input size - expected matrix

I’m trying to get my network to evaluate an INDArray. This is my network: public class DQN { private final int inputSize; private final int outputSize; private final MultiLayerNetwork network; public DQN(int inputSize, int outputSize){ …
0
votes
1 answer

How to convert a jpeg image into a matrix rank 2 array for a model to predict (Using deeplearning4j libraries)

I am currently using deeplearning4j libraries to create a model that predicts an handwritten number from an image. I have created the model and now want to test it out but keep getting this error…
ConfusedBacon
  • 85
  • 2
  • 8
0
votes
0 answers

Implement DotProduct layer in DeepLearning4j

I am trying to implement a dot product layer but it doesn't seem to work correctly. Here's a couple of implementations I have so far Implementation 1 // dot product of betas and factors graphBuilder.addVertex("layer_product_", …
harshvardhan.agr
  • 165
  • 1
  • 12
0
votes
1 answer

How to add a Activation Layer with a specified value in DeepLearning4J?

For example, the default value of alpha in Activation-ELU is 1. How to set it to 1.5(say). In other framework like PyTorch we can do this using torch.nn.ELU(1.5). I cannot find any documentation in Deeplearning4J.
0
votes
0 answers

IllegalStateException: ERROR: Unable to run session Expects arg[0] to be uint8 but int32 is provided || Unsupported data type: UBYTE

Trying to run RunGraphExample frozen_graph.pb on trained model Faster-RCNN with Tensorflow 1.13.1 , org.deeplearning4j "1.0.0-beta6" (Tensorflow 1.15) val data: Array[Array[Int]] = new Array[Array[Int]](img.getWidth * img.getHeight); for (i <- 0…
Alex Shcherbyna
  • 301
  • 4
  • 9
0
votes
0 answers

Different results prediction with flask and with dl4j

I find some problems importing models training by tensorflow and keras python models. With flask is easy but using deeplearning4j or org.tensorflow I have some problems. it seems java libraries are still undeveloped. In this case, the tokenization…
Eva Andres
  • 33
  • 4
0
votes
1 answer

Understanding INDArray dimension reshaping for Tensorflow Object detection models

Trying to load Tensorflow trained model into Deeplearning4J with following error: IllegalStateException: Invalid array shape: cannot associate an array with shape [38880] with a placeholder of shape [-1, -1, -1, 3]:shape is wrong rank or does not…
0
votes
1 answer

how to calculate Euclidean distance between vectors of two INDArrays in ND4J?

I am trying to calculate euclidean distance between two INDArrays (supposing that INDArray is alternative of numpy array). In python, I have achieved this as: import numpy as np from scipy.spatial.distance import cdist arr1 = np.array(of some…
foobar
  • 571
  • 1
  • 5
  • 20
0
votes
1 answer

Error: Labels and preOutput must have equal shapes

I'm using deeplearning4j and I keep getting this error. I'm very very new to dl4j and AI in general. I'm trying to predict the next value given the 10 previous values. I am using an LSTM. I'm pretty sure I might have to use masking but I'm clueless…
0
votes
1 answer

I got Exception java.lang.NumberFormatException: For input string: "5.1" while reading csv

int numLinesToSkip = 0; char delimiter = ','; RecordReader recordReader = new CSVRecordReader(numLinesToSkip,delimiter); // recordReader.initialize(new FileSplit(new File(DownloaderUtility.IRISDATA.Download(),"iris.txt"))); …
0
votes
1 answer

How to change UIServer port for Deeplearning4j from 9000 to some other?

Currently I have a preconfigured VPN client that for some own sake uses exactly 9000 and there is no way to reconfigure it. How can I initiate dl4j's UIServer to some other port? UIServer is based on Eclipse Vert.x. I have been tried to set up…
Eljah
  • 4,188
  • 4
  • 41
  • 85
0
votes
1 answer

How to configure DL4j for local images

I'm trying to use DeepLearning4j to categorize 32x32 images in numbers from 0-9. I've looked up a number of examples and tutorials, but always run into some exception when fitting the dataset to a network. Im currently trying to use a…
Heliox
  • 11
  • 2
0
votes
0 answers

sigsev error in containerized deeplearning4j app

Im running a deeplearning app in a docker container running openjdk alpine bash-4.4$ java -version openjdk version "1.8.0_212" OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed…
smk
  • 5,340
  • 5
  • 27
  • 41
0
votes
2 answers

How can I load data from PostgreSQL into Deep Learning 4J?

Could you help to understand how can I load data from PostgreSQL into Deep Learning 4J, please? I'll appreciate if anyone have an example. Thanks in advance
Celso Marques
  • 378
  • 1
  • 4
  • 15