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

Why DeepLearning4J CNN is returning not probabilities but only 0s and 1s in the INDArray output

I am playing with DL4J version 1.0.0-beta3 and trying to create a convolutional neural network for recognizing 32x32 images of chess pieces. Here is the code I use to create and train the net: public class BuildNetwork1 { public static void…
0
votes
0 answers

Predicting next word using RNN in DL4J - What should 'labels' be?

I'm trying to create an RNN that would predict the next word, given the previous word. But I'm struggling with modeling this into a dataset, specifically, how to indicate the next word to be predicted as a 'label'. I could use a hot label encoded…
Ali
  • 261,656
  • 265
  • 575
  • 769
0
votes
1 answer

A3C ArrayOutOfBounds

Error whenever I call A3CDiscreteDense().train(); Exception in thread "Thread-7" java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(Unknown Source) at java.util.ArrayList.get(Unknown Source) at…
Akash garg
  • 125
  • 6
0
votes
0 answers

nd4j dataset change to zero when i use shuffle method

I am using DeepLearning4J and nd4j-cuda-10.2. all of the DataSet elements change to zero after I use the shuffle() method. I have traced the code and I think there is a problem with the registerAction() method. DataSet…
0
votes
0 answers

What could cause a state chart not to update while training a RL4J model inside Anylogic PLE?

I am trying to build a RL model with deep Q-Learning using RL4J in the Anylogic PLE as part of my thesis. Unfortunately, I am not overly familiar with Anylogic and DL4J and therefore might be missing some obvious steps. I only have access to the PLE…
Daniel
  • 1
  • 3
0
votes
0 answers

What is the best way to train a deep reinforcement learning model with RL4J in Anylogic PLE?

I am trying to build a RL model with deep Q-Learning using RL4J in the Anylogic PLE as part of my thesis. Unfortunately, I am not overly familiar with Anylogic and DL4J and therefore might be missing some obvious steps. I only have access to the PLE…
Daniel
  • 1
  • 3
0
votes
2 answers

Problems running Dl4j with CUDA

I'm trying to run a dl4j model using GPU instead of CPU. The model runs perfectly well using CPU. So I decided to try CUDA to be able to to take advantage of the my GPU. I followed every step described in here and for the CUDA install I followed the…
ABFovox
  • 39
  • 4
0
votes
1 answer

DL4J: binarizing middle layer of autoencoder for semantic hashing

I'm trying to implement semantic hashing for the MNISTAutoencoder example, using DL4J. How would I binarize the middle layer activations? In the ideal case, I'm looking for some change to my network setup which gives (almost) binary activations for…
mstrap
  • 16,808
  • 10
  • 56
  • 86
0
votes
1 answer

how can I reverse the elements of a column of a matrix in ND4J?

I am trying to rewrite this line of python code in JAVA with ND4j library. data[index_odd] = tmp[::-1,:] It reverses the column's elements. (in other words, the order of rows) I used this line but apparently it just works when…
0
votes
1 answer

Reduction of numbers accuracy in ND4J

I have an array namely “real”. it has a vector of double numbers. I am trying to create an INDArray based on my vector. my code is below : double real_d = (double) ArrBD.get(0); INDArray real = Nd4j.create(real_d); It works but unfortunately, it…
0
votes
1 answer

Setup linear regression with a factorMatrix - DL4j

I have a factorMatrix of type INDArray which is xIn It contains of 5 columns [A, B, C, D, E] and another INDArray with 1 column [y] which is yIn For the ones who are familiar with MatLab I could use now: modelTrain = fitlm([XInSample yInSample] ,…
Anna Klein
  • 1,906
  • 4
  • 27
  • 56
0
votes
1 answer

How to create ND4J NDArrays on GPU in DeepLearning4J?

Is there a way to create NDArrays in DL4J so that the operations are done on GPU ? For example in pytorch, cuda0 = torch.device('cuda:0') x = torch.tensor([1., 2.], device=cuda0) I cannot find a way to specify a back-end (cpu or gpu) if my system…
0
votes
2 answers

dl4j lstm not successful

Im trying to copy the exrcise about halfway down the page on this link: https://d2l.ai/chapter_recurrent-neural-networks/sequence.html The exercise uses a sine function to create 1000 data points between -1 through 1 and use a recurrent network to…
cagney
  • 492
  • 3
  • 11
0
votes
1 answer

Where can I find the installed header files for DL4J - INDArray related operations?

I have installed DL4J using maven. I need to see the installed .so and CPP header files that are used for INDArray calls? If I am not wrong the EXPORT functions are in NativeOps.h file. Where can I find them? I think they are located inside…
0
votes
1 answer

Simple Reinforcement Learning example

i try to create a simplified rl4j example based on the existing Gym and Malmo examples. Given is a sine wave and the AI should say if we are on top of the wave, on bottom or somewhere else(noop). The SineRider is the "Game", State is the value of…