# ND4J

**URL:** https://community.konduit.ai/c/nd4j/13.md?page=2

[Latest](https://community.konduit.ai/latest.md) · [Categories](https://community.konduit.ai/categories.md)

**Page:** 3

---

## [& operation for Nd4J](https://community.konduit.ai/t/operation-for-nd4j/1527)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 4\
**Last updated:** [August 3, 2021, 3:18pm UTC](https://community.konduit.ai/t/operation-for-nd4j/1527 "2021-08-03T15:18:25Z")

</div>

Is there a way to implement the & or &= for nd4j arrays? for example I want to find relative extrema so I wrote the following function: private static INDArray boolrelextrema( INDArray data, BiFunction\<INDA…

---

## [How to use DynamicCustomOps objects for their name-sake operations](https://community.konduit.ai/t/how-to-use-dynamiccustomops-objects-for-their-name-sake-operations/1503)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 5\
**Last updated:** [August 3, 2021, 1:22pm UTC](https://community.konduit.ai/t/how-to-use-dynamiccustomops-objects-for-their-name-sake-operations/1503 "2021-08-03T13:22:22Z")

</div>

Looking through the docs,I see a lot of names I recognize from NumPy as extensions/implementations of CustomOp or DynamicCustomOp These objects don’t have any methods that seem meant for the operations implied by the cl…

---

## [Search for "Off-Heap" Memory Leak](https://community.konduit.ai/t/search-for-off-heap-memory-leak/1496)

<div class="topic-metadata">

**Author:** [@weinino](https://community.konduit.ai/u/weinino)\
**Replies:** 4\
**Last updated:** [July 22, 2021, 8:31am UTC](https://community.konduit.ai/t/search-for-off-heap-memory-leak/1496 "2021-07-22T08:31:50Z")

</div>

Hi there I’m eventually observing an off-heap memory leak using SameDiff. I’ve checked the heap memory with jvisualvm and it seems to stay consistent on a certain level. Meanwhile, the overall memory consumption of the …

---

## [Help with and possible bug in BooleanIndexing](https://community.konduit.ai/t/help-with-and-possible-bug-in-booleanindexing/1501)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 1\
**Last updated:** [July 16, 2021, 11:27pm UTC](https://community.konduit.ai/t/help-with-and-possible-bug-in-booleanindexing/1501 "2021-07-16T23:27:43Z")

</div>

I’m looking to replicate some behavior in NumPy, namely slicing/indexing with booleans: import numpy as np a = np.arange(10) mask = a \< 5 a\[mask\] # array(\[0, 1, 2, 3, 4\]) I have found and played with the BooleanIndexi…

---

## [Translating Matlab to Java](https://community.konduit.ai/t/translating-matlab-to-java/1486)

<div class="topic-metadata">

**Author:** [@officiallor](https://community.konduit.ai/u/officiallor)\
**Replies:** 6\
**Last updated:** [July 12, 2021, 6:00am UTC](https://community.konduit.ai/t/translating-matlab-to-java/1486 "2021-07-12T06:00:02Z")

</div>

Hello, I’m trying to translate something from matlab to java for a project and I’m facing some (many) difficulties. I have created a dummy block of code to explain what I’m trying to do atm. I tried several things inclu…

---

## [Replace where condition](https://community.konduit.ai/t/replace-where-condition/1488)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 1\
**Last updated:** [July 10, 2021, 12:03am UTC](https://community.konduit.ai/t/replace-where-condition/1488 "2021-07-10T00:03:15Z")

</div>

Is there a Condition that works for elementwise comparison of two INDArrays? Essentially I have want to compare two arrays, and replace any entries that are not equal with zero. This would be something like: data.repl…

---

## [Create custom element-wise operations between two matrices](https://community.konduit.ai/t/create-custom-element-wise-operations-between-two-matrices/1424)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 1\
**Last updated:** [June 4, 2021, 11:56pm UTC](https://community.konduit.ai/t/create-custom-element-wise-operations-between-two-matrices/1424 "2021-06-04T23:56:36Z")

</div>

I’m trying to figure out how to compute a similarity matrix using a Gaussian similarity score between every data point (row, that is) in an INDArray matrix. In a for loop, that’d look something like this psuedocode: si…

---

## [Encapsulate TF c/c++ interface](https://community.konduit.ai/t/encapsulate-tf-c-c-interface/1115)

<div class="topic-metadata">

**Author:** [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Replies:** 12\
**Last updated:** [June 2, 2021, 10:05pm UTC](https://community.konduit.ai/t/encapsulate-tf-c-c-interface/1115 "2021-06-02T22:05:38Z")

</div>

Too many basic ops which TF has such as tf.einsum(…) missing in DL4J, is it possible to encapsulate TF c/c++ interface to have such ops?

---

## [Equals with epsilon](https://community.konduit.ai/t/equals-with-epsilon/1419)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 0\
**Last updated:** [June 2, 2021, 2:09pm UTC](https://community.konduit.ai/t/equals-with-epsilon/1419 "2021-06-02T14:09:14Z")

</div>

I have written a wrapper around ND4J’s eigen decomp method symmetricGeneralizedEgenvalues. In this wrapper I check for symmetry and return null for non symmetric matrices, rather than incorrect results. Now, I have a ma…

---

## [Contributing to docs](https://community.konduit.ai/t/contributing-to-docs/1405)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 2\
**Last updated:** [May 26, 2021, 1:18pm UTC](https://community.konduit.ai/t/contributing-to-docs/1405 "2021-05-26T13:18:11Z")

</div>

Hi, I’m not a great coder, but I am a good writer. I thought I might contribute to the docs, but I noticed that the repo on GitHub hasn’t seen a commit on the master branch in 3 years. Has the project been moved elsewhe…

---

## [Eigen decomp for non-symmetric matrices?](https://community.konduit.ai/t/eigen-decomp-for-non-symmetric-matrices/1403)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 0\
**Last updated:** [May 25, 2021, 7:33pm UTC](https://community.konduit.ai/t/eigen-decomp-for-non-symmetric-matrices/1403 "2021-05-25T19:33:34Z")

</div>

I’ve been trying to figure out why the eigenvalue decomposition provided by ND4J is returning incorrect results in my unit tests. I worked out the matrix decomp by hand and calculated it with several other libraries (EJM…

---

## [Single threaded Nd4j operations](https://community.konduit.ai/t/single-threaded-nd4j-operations/1140)

<div class="topic-metadata">

**Author:** [@MatthewMiddlehurst](https://community.konduit.ai/u/MatthewMiddlehurst)\
**Replies:** 8\
**Last updated:** [May 25, 2021, 6:43pm UTC](https://community.konduit.ai/t/single-threaded-nd4j-operations/1140 "2021-05-25T18:43:01Z")

</div>

Hello, My use case requires any application to run on a single thread as our hardware accepts multiple submissions from multiple users, and unintended multithreading can cause conflicts. I am using Nd4j primarily for m…

---

## [No output arrays were provided and calculateOutputShape failed to execute INDArray.getWhere()](https://community.konduit.ai/t/no-output-arrays-were-provided-and-calculateoutputshape-failed-to-execute-indarray-getwhere/1393)

<div class="topic-metadata">

**Author:** [@masterchief](https://community.konduit.ai/u/masterchief)\
**Replies:** 0\
**Last updated:** [May 18, 2021, 5:20am UTC](https://community.konduit.ai/t/no-output-arrays-were-provided-and-calculateoutputshape-failed-to-execute-indarray-getwhere/1393 "2021-05-18T05:20:41Z")

</div>

I am trying the following code for boolean indexing: INDArray scalarValues = Nd4j.createFromArray(new int\[\] {1, 2, 3, 4, 5}); INDArray values = Nd4j.ones(DataType.INT32, 5); INDArray result = scalarValues.ge…

---

## [Failed to calculate output shapes for op](https://community.konduit.ai/t/failed-to-calculate-output-shapes-for-op/1392)

<div class="topic-metadata">

**Author:** [@masterchief](https://community.konduit.ai/u/masterchief)\
**Replies:** 5\
**Last updated:** [May 18, 2021, 3:39am UTC](https://community.konduit.ai/t/failed-to-calculate-output-shapes-for-op/1392 "2021-05-18T03:39:53Z")

</div>

I am running the following in a JUnit test. INDArray conditions = Nd4j.ones(1, 5); INDArray\[\] testWhere = Nd4j.where(conditions, null, null); But get the following error: java.lang.RuntimeException: Data types validat…

---

## [Does eigen decomposition exist in the library?](https://community.konduit.ai/t/does-eigen-decomposition-exist-in-the-library/1382)

<div class="topic-metadata">

**Author:** [@wcneill](https://community.konduit.ai/u/wcneill)\
**Replies:** 3\
**Last updated:** [May 14, 2021, 3:23pm UTC](https://community.konduit.ai/t/does-eigen-decomposition-exist-in-the-library/1382 "2021-05-14T15:23:20Z")

</div>

I’m probably missing something, but I can’t seem to find a full eigen decomposition in your library, although it exists here on GitHub: https://github.com/deeplearning4j/nd4j/blob/14410087388980c6c25111859a1272418e20ec54…

---

## [ND4J compile from source fails with snapshot](https://community.konduit.ai/t/nd4j-compile-from-source-fails-with-snapshot/1349)

<div class="topic-metadata">

**Author:** [@MPdaedalus](https://community.konduit.ai/u/MPdaedalus)\
**Replies:** 6\
**Last updated:** [May 3, 2021, 7:38am UTC](https://community.konduit.ai/t/nd4j-compile-from-source-fails-with-snapshot/1349 "2021-05-03T07:38:23Z")

</div>

Trying to compile DL4J from scratch as I need to modify some core classes. Following https://deeplearning4j.konduit.ai/getting-started/build-from-source however when building ND4j after libnd4j was successfully built …

---

## [Workspace "WS\_LAYER\_WORKING\_MEM" for array type FF\_WORKING\_MEM is not open](https://community.konduit.ai/t/workspace-ws-layer-working-mem-for-array-type-ff-working-mem-is-not-open/1317)

<div class="topic-metadata">

**Author:** [@HGuillemet](https://community.konduit.ai/u/HGuillemet)\
**Replies:** 6\
**Last updated:** [April 20, 2021, 11:50am UTC](https://community.konduit.ai/t/workspace-ws-layer-working-mem-for-array-type-ff-working-mem-is-not-open/1317 "2021-04-20T11:50:40Z")

</div>

Hello, After some graph.fit(trainerIter) I’d like to do something like: while (testIter.hasNext()) { scoreSum += graph.score(testIter.next()); n++; } But I get the following exception: org.nd4j.li…

---

## [Compiling on ARM](https://community.konduit.ai/t/compiling-on-arm/283)

<div class="topic-metadata">

**Author:** [@liweigu](https://community.konduit.ai/u/liweigu)\
**Replies:** 29\
**Last updated:** [April 7, 2021, 11:39pm UTC](https://community.konduit.ai/t/compiling-on-arm/283 "2021-04-07T23:39:49Z")

</div>

I’m tring to compile the source code on ARM server. The enviroment is same with Run on ARM cpu server - #6 by liweigu . The source code is downloaded from github at 2020-03-16. There are 2 problems. detect OS to ‘li…

---

## [How to feed a network with data from GPU](https://community.konduit.ai/t/how-to-feed-a-network-with-data-from-gpu/1229)

<div class="topic-metadata">

**Author:** [@HGuillemet](https://community.konduit.ai/u/HGuillemet)\
**Replies:** 3\
**Last updated:** [March 9, 2021, 1:36am UTC](https://community.konduit.ai/t/how-to-feed-a-network-with-data-from-gpu/1229 "2021-03-09T01:36:07Z")

</div>

I’d like to: decode video frame apply some simple processing (rescaling, channel mix etc…) probably with OpenCV feed a ComputationGraph while staying GPU-side. What’s the best way to do this while limiting memory cop…

---

## [Mvn commamd built nd4j-native but not nd4j-cuda, what is the cause?](https://community.konduit.ai/t/mvn-commamd-built-nd4j-native-but-not-nd4j-cuda-what-is-the-cause/1206)

<div class="topic-metadata">

**Author:** [@TempKonduitUser1](https://community.konduit.ai/u/TempKonduitUser1)\
**Replies:** 5\
**Last updated:** [February 27, 2021, 11:40am UTC](https://community.konduit.ai/t/mvn-commamd-built-nd4j-native-but-not-nd4j-cuda-what-is-the-cause/1206 "2021-02-27T11:40:17Z")

</div>

Issue Description Please describe our issue, along with: Successfully build nd4j-cuda nd4j-native was successfully built but nothing has been done with nd4j-cuda Version Information Please indicate relevant versions, …

---

## [What modules do we factually need to build on the newest CUDA version 11.1?](https://community.konduit.ai/t/what-modules-do-we-factually-need-to-build-on-the-newest-cuda-version-11-1/1174)

<div class="topic-metadata">

**Author:** [@TempKonduitUser1](https://community.konduit.ai/u/TempKonduitUser1)\
**Replies:** 3\
**Last updated:** [February 20, 2021, 5:54am UTC](https://community.konduit.ai/t/what-modules-do-we-factually-need-to-build-on-the-newest-cuda-version-11-1/1174 "2021-02-20T05:54:10Z")

</div>

We are on the Windows platform with CUDA version 11.1 and the newest Nvidia GPU card. We have tried but found some trivial to overcome. Until now we have obtained nd4jcuda.dll from building libND4J from source. Since the…

---

## [Build libnd4jcuda from source on windows reports Access denied](https://community.konduit.ai/t/build-libnd4jcuda-from-source-on-windows-reports-access-denied/1171)

<div class="topic-metadata">

**Author:** [@TempKonduitUser1](https://community.konduit.ai/u/TempKonduitUser1)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 7:12am UTC](https://community.konduit.ai/t/build-libnd4jcuda-from-source-on-windows-reports-access-denied/1171 "2021-02-09T07:12:28Z")

</div>

Issue Description Please describe our issue, along with: Sucessfully build libnd4jcuda.dll Followed instrcutions step by step but reported some naive error Version Information Please indicate relevant versions, includ…

---

## [Manually destroying AMDSI workspace Debug by ND4J AsyncMultiDataSetIterator](https://community.konduit.ai/t/manually-destroying-amdsi-workspace-debug-by-nd4j-asyncmultidatasetiterator/1159)

<div class="topic-metadata">

**Author:** [@artinmare](https://community.konduit.ai/u/artinmare)\
**Replies:** 1\
**Last updated:** [February 6, 2021, 7:14am UTC](https://community.konduit.ai/t/manually-destroying-amdsi-workspace-debug-by-nd4j-asyncmultidatasetiterator/1159 "2021-02-06T07:14:32Z")

</div>

Hello Everyone, I’m new to the forum here so I’m sorry if my question is out of place :pray: Recently when using TinyYolo example given by the deeplearning4j.examples repository I found that somehow I got this debug mas…

---

## [Is longer lasting allocation on host memory possible/intended use case with the workspace concept?](https://community.konduit.ai/t/is-longer-lasting-allocation-on-host-memory-possible-intended-use-case-with-the-workspace-concept/509)

<div class="topic-metadata">

**Author:** [@sascha08-15](https://community.konduit.ai/u/sascha08-15)\
**Replies:** 5\
**Last updated:** [January 26, 2021, 3:34pm UTC](https://community.konduit.ai/t/is-longer-lasting-allocation-on-host-memory-possible-intended-use-case-with-the-workspace-concept/509 "2021-01-26T15:34:10Z")

</div>

Hello, I created an iterator and within it’s constructor, I want to hold the data it’s going to use in the .next(num) method. Hence, the idea was to allocate everything to host memory in one workspace. I made it work t…

---

## [Einsum function](https://community.konduit.ai/t/einsum-function/1108)

<div class="topic-metadata">

**Author:** [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Replies:** 0\
**Last updated:** [January 7, 2021, 1:41am UTC](https://community.konduit.ai/t/einsum-function/1108 "2021-01-07T01:41:32Z")

</div>

attn\_for\_self = tf.einsum(“…NHI , IHO → …NHO”, x, self.attn\_kernel\_self) Does ND4J have einsum function like it in TF?

---

## [Froze graph to pb, Exception: 1 Unprocessed nodes](https://community.konduit.ai/t/froze-graph-to-pb-exception-1-unprocessed-nodes/1100)

<div class="topic-metadata">

**Author:** [@Maple](https://community.konduit.ai/u/Maple)\
**Replies:** 2\
**Last updated:** [January 5, 2021, 2:53am UTC](https://community.konduit.ai/t/froze-graph-to-pb-exception-1-unprocessed-nodes/1100 "2021-01-05T02:53:59Z")

</div>

When i try to use the freezeTrainedBert.py to freeze the graph , i choose the node name : loss/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits, but i got follow exception: Blockquote Excepti…

---

## [Libjnicudart.so: libcudart.so.10.2: cannot open shared object file: No such file or directory](https://community.konduit.ai/t/libjnicudart-so-libcudart-so-10-2-cannot-open-shared-object-file-no-such-file-or-directory/1071)

<div class="topic-metadata">

**Author:** [@asadganiev](https://community.konduit.ai/u/asadganiev)\
**Replies:** 10\
**Last updated:** [December 23, 2020, 6:03am UTC](https://community.konduit.ai/t/libjnicudart-so-libcudart-so-10-2-cannot-open-shared-object-file-no-such-file-or-directory/1071 "2020-12-23T06:03:33Z")

</div>

I am getting the following org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException when launching an dl4j-examples with GPU: o.n.l.f.Nd4jBackend - Skipped \[JCublasBackend\] backend (unavailable): java.lang.Unsati…

---

## [About ND4J Where() method](https://community.konduit.ai/t/about-nd4j-where-method/1069)

<div class="topic-metadata">

**Author:** [@Akshay591](https://community.konduit.ai/u/Akshay591)\
**Replies:** 4\
**Last updated:** [December 22, 2020, 10:07am UTC](https://community.konduit.ai/t/about-nd4j-where-method/1069 "2020-12-22T10:07:55Z")

</div>

How do i get index where condition is matched. for ex - INDArray test = Nd4j.create(new double{2,3,5,6,7,8,9,5,6,2,3,2,2}); if from test array i want index where number is equal to 2 , How will i get that ??

---

## [Jars from maven to Ant project / resolving backend](https://community.konduit.ai/t/jars-from-maven-to-ant-project-resolving-backend/1061)

<div class="topic-metadata">

**Author:** [@MotoCommando](https://community.konduit.ai/u/MotoCommando)\
**Replies:** 4\
**Last updated:** [December 18, 2020, 10:09am UTC](https://community.konduit.ai/t/jars-from-maven-to-ant-project-resolving-backend/1061 "2020-12-18T10:09:09Z")

</div>

Hi, Currently I’m developing an app which is ant project (and won’t become maven any time soon) and I would like to use deeplearning4j for some ML tasks in the app. I have already build maven project and I started addin…

---

## [ND4JIllegalStateException](https://community.konduit.ai/t/nd4jillegalstateexception/1037)

<div class="topic-metadata">

**Author:** [@lavajaw](https://community.konduit.ai/u/lavajaw)\
**Replies:** 6\
**Last updated:** [December 8, 2020, 10:03pm UTC](https://community.konduit.ai/t/nd4jillegalstateexception/1037 "2020-12-08T22:03:36Z")

</div>

On windows with beta7 I can train models with data type DOULE or FLOAT, but when I try to train with HALF this exception is thrown: Caused by: org.nd4j.linalg.exception.ND4JIllegalStateException: Op \[histogram\] X argume…

[Previous page](https://community.konduit.ai/c/nd4j/13.md?page=1)

[Next page](https://community.konduit.ai/c/nd4j/13.md?page=3)
