Questions tagged [nd4j]

ND4J and ND4S are scientific computing libraries for the JVM.

These Java libraries provide implementations of n-dimensional arrays and linear algebra algorithms with emphasis on performance for large arrays. Arrays are stored off heap with operations on arrays performed outside the JVM employing BLAS or Cuda and the system's GPU. Numpy and MATLAB were the inspiration according to the authors.

Useful Links:

120 questions
0
votes
1 answer

Is there a convenient way to invert an Nd4j array elementwise?

E.g. I have x = [1 , 2, 3]. I want y = 1/x = [1, 1/2, 1/3]. Ideally, I want a function that works the same way as the following line taken from the nd4j documentation, only for the multiplicative inverse instead of the hyperbolic tangent. INDArray…
Shaun
  • 23
  • 1
  • 6
0
votes
2 answers

ND4J arrays & their shapes: getting data into a list

Consider the following code, which uses the ND4J library to create a simpler version of the "moons" test data set: val n = 100 val n1: Int = n/2 val n2: Int = n-n1 val outerX = Nd4j.getExecutioner.execAndReturn(new Cos(Nd4j.linspace(0, Math.PI,…
syenmesh
  • 85
  • 5
0
votes
1 answer

Zero Columns In DataVec Matrix When Running Deeplearning4J Classification

I'm attempting to run the deeplearning4j quickstart classification problem. I'm using Windows 8 64 bit, Oracle JDK 8, IntelliJ 2017.2.5, and Maven 3.3.9. I got past the Canova issue that plagued me earlier. Now I have a new problem at…
duffymo
  • 305,152
  • 44
  • 369
  • 561
0
votes
1 answer

nd4j arrays return incorrect rank

When I create an nd array from a 1d float[] it has rank 2. INDArray array = Nd4j.create(new float[] {0,1,2,3,4,5}); int rank = array.rank(); // Is 2! From the documentation this is supposed to be rank 1: http://nd4j.org/userguide#createfromjava Any…
0
votes
1 answer

Exception in thread "main" java.lang.NoClassDefFoundError: org/deeplearning4j/nn/conf/layers/Layer

I am trying to build an application on spark using Deeplearning4j library. I have a cluster where i am going to run my jar(built using intelliJ) using spark-submit command. Here's my code package Com.Spark.Examples import…
0
votes
1 answer

DeepLearning4J: org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException when running in jupyter

I'm trying to run a DL4J example in a jupyter Notebook (IBM DSExperience) so I've ported the MLP Classifier example from Java to Scala, added the dependencies but currently struggling with the backend selection. I thought is would be sufficient just…
Romeo Kienzler
  • 3,373
  • 3
  • 36
  • 58
0
votes
2 answers

dl4j - Unable to get number of of rows for a non 2d matrix

I am current using nd4j and dl4j to implement some deep learning algorithm. However, I can not get datavec + dl4j working in the first place. Here is my image converter: public class ImageConverter { private static Logger log =…
Steven Luo
  • 2,350
  • 3
  • 18
  • 35
0
votes
1 answer

Converting org.bytedeco.javacpp.Mat to Java int/float array

My image is represented as org.bytedeco.javacpp.Mat. And I simply want to convert it to Java array of float/int. Reason behind conversion is that I want to use the Java array in other library (Nd4j) for image permute purposes. I have tried below…
-1
votes
1 answer

Deeplearning4j: Generate random INDArray(s) as input for a MultiLayerNetwork

I am working on a project where I intend to do some performance analysis on MultiLayerNetworks. As the title says it, I intend to create a random INDArray of inputs and labels of arbitrary size, which will be used as (training-)input for an…
Fanta
  • 27
  • 5
-1
votes
1 answer

How can be series, a bunch of signals, not the single signal input of sequential data be classified by several groups of classification with DL4J?

I have 60 signals sequences samples with length 200 each labeled by 6 label groups, each label is marked with one of 10 values. I'd like to get prediction in each label group on each label when feeding the 200-length or even shorter sample to the…
Eljah
  • 4,188
  • 4
  • 41
  • 85
-1
votes
1 answer

Compute option payoff on a vectorial way (no loop)

Hy everyone, I would like to price vanilla options with Nd4J. So i am looking to achieve the operation with Nd4J max(0,X[i]-K) => Y[i] with X the input INDArray K a float Y the output INDArray Is someone have an idea how to proceed ? Thanks by…
alx
  • 29
  • 1
  • 3
-1
votes
1 answer

Training NNs on GPU with DL4J

Could I train my NNs on GPU with using DL4J and ND4J and system parameters? Windows 7 64bit Nvidia GeForce GT 420M (CUDA computing capability - 2.1)
-1
votes
1 answer

Parallel computing in N-Dimensional Arrays for Java

Does the library ND4J (N-Dimensional Arrays for Java) support parallel computing as like in numpy for Python?
-1
votes
1 answer

IntelliJ IDEA can't get last version of dependence

I trying to import last version of org.nd4j:nd4j-api:0.4-rc3.7, but there is only org.nd4j:nd4j-api:0.4-rc1.2. So, how to add last version of nd4j?
AshFTW
  • 141
  • 3
  • 12
-2
votes
1 answer

How to iterate over indices of a matrix?

In Python when we want to iterate over a matrix with an arbitrary dimension, we can use this line of code: for index in np.ndindex(data.shape[2:]): for example : > for index in np.ndindex(3, 2, 1): > print(index) (0, 0, 0) (0, 1, 0) (1, 0, 0)…
1 2 3 4 5 6 7
8