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

Out of memory error when trying to allocate memory mapped INDArray

I'm trying to allocate a large memory-mapped 2d array that's larger than RAM and it keeps failing with an out of memory error. I'm using java8, linux-amd64 and nd4j 1.0.0-beta4. My understanding according to the docs…
0
votes
1 answer

What's the simplest way to get a Spark DataFrame from arbitrary Array Data in Scala?

I've been breaking my head about this one for a couple of days now. It feels like it should be intuitively easy... Really hope someone can help! I've built an org.nd4j.linalg.api.ndarray.INDArray of word occurrence from some semi-structured data…
Nahko
  • 78
  • 10
0
votes
0 answers

How to implement a multidimensional array library from scratch like nd4j or numpy

I am making a numpy equivalent library like nd4j in java but I want to implement it myself. However, I cannot find any resources online to help my research. I hope to support basic numpy features like randn and shape and dot product I have made a…
Clement
  • 128
  • 11
0
votes
1 answer

ND4J runs slowly on GPU, but runs fast on CPU

Today I'll try to use CUDA in my ND4J and Deeplearnint4j project. After that, Neural Net (imported from Keras) began work faster. But the next code began work slowly I have already tried to change ND4J backend to native (CPU) and I got fast…
vladF
  • 101
  • 2
0
votes
1 answer

Sigmoid Derivative using nd4j

I perform sigmoid which works fine but sigmoidDerivative gives the same result as sigmoid in nd4j. What is the difference between Transforms.sigmoidDerivative(x) and Transforms.sigmoidDerivative(x, true)? INDArray x = Nd4j.create(new double[] {…
absin
  • 1,116
  • 10
  • 21
0
votes
2 answers

Use Nd4j in an Intellij project

I'm trying to use Nd4j in a Kotlin project in Intellij IDEA. In Project Structure -> Libraries, I used the "From Maven" command to add the following…
peastman
  • 1,239
  • 1
  • 13
  • 18
0
votes
1 answer

org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException in wildfly

I am using deeplearning4j with JBOSS wildfly. I have placed all the modules as mentioned below in the classpath:
Dwai
  • 119
  • 1
  • 15
0
votes
1 answer

ND4J, multidimensional matrix transpose with axes

What is the NDArray equivalent for numpy transpose like this: out = np.transpose(in, (0,2,1,3))? (in is of rank 4)
tzolov
  • 469
  • 4
  • 6
0
votes
1 answer

ND4J class-package mappings

I am getting the following error while running a program using ND4J: java.lang.ClassNotFoundException: org.nd4j.tools.PropertyParser So far I have the following nd4j artifacts in my pom file: javacpp, nd4j-jblas, nd4j-native-platform, nd4j-native,…
shanlodh
  • 1,015
  • 2
  • 11
  • 30
0
votes
2 answers

Does Eclipse Deeplearning4j provide a JAR file download?

This question comes up a lot on the support channel. People think downloading JAR files would simplify things.
racknuf
  • 444
  • 3
  • 12
0
votes
0 answers

ND4J Execution Time

Is ND4J faster than the normal Java arrays? I've done a basic test by initializing a 100x100 ND4J array then printing it, then did the same for a normal array. The execution time of the normal array is 10x faster. Any idea? ND4J code: INDArray a =…
me._
  • 51
  • 1
  • 8
0
votes
0 answers

ND4J Array view

I'm trying to get a view of an existing matrix (INDArray) excluding one column. Ex: Original: 1|2|3 4|5|6 What I Want: 1|3 4|6 The Documentation shows how to take intervals of columns/rows but nothing about excluding arbitrary row/column. Edit 1 (My…
0
votes
2 answers

Nd4j permute does not permute - what have I done wrong?

i am trying to permute an array as described in the documentation (actual a link to mathworks). My code, however does not reproduce the results. Actually, it seems like my code does nothing: INDArray foobar = Nd4j.linspace(0, 2,…
SiOx
  • 478
  • 1
  • 6
  • 13
0
votes
2 answers

How to determine at runtime if the dl4j/nd4j backend is CPU or GPU?

There is an optimization for dl4j that only works with GPUs: DataTypeUtil.setDTypeForContext(DataBuffer.Type.HALF) I'd like to only make that call if the backend is a GPU. In my Maven pom.xml, I've got