Questions tagged [dl4j]

Deeplearning4j is the first commercial-grade, open-source, distributed deep-learning library written for Java and Scala

-1
votes
0answers
10 views

Autoencoder for real-value data

When creating an Autoencoder, how do I make an active function to let you learn data points rather than MNIST images?. There is only MNIST IMAGE example. For example, we have 50by2 data. This data are ...
0
votes
1answer
33 views

Deeplearning4j Error: no jniopenblas in java.library.path

I first started using Deeplearning4j this weekend. I looked at the page at https://deeplearning4j.org/docs/latest/deeplearning4j-quickstart and saw the option for "Eclipse setup without Maven". Since ...
0
votes
0answers
20 views

DL4J UI: How to display cost error of the validation test?

I use DL4J and I attach the UI. How can I display on UI the cost error of the validation set? What have I to configure? I have to check if there is overfitting but the UI display only the cost error ...
1
vote
2answers
30 views

Convert keras model in DL4J model

I have to save and load a keras model in java and then I thought I could use DL4J. The problem is that when I save my model it does not have the Embedding layer with his own weight. I have the same ...
0
votes
1answer
16 views

How to use an existing DL4J trained model to classify new input

I have a DL4J LSTM model that generates a binary classification of sequential input. i have trained and tested the model and am happy with the precision/recall. Now I want to use this model to ...
0
votes
1answer
27 views

What reason could be for the F1 score that was not a harmonic mean of precision and recall

[![enter image description here][1]][1]What reason could be for the F1 score that was not a harmonic mean of precision and recall with macro-average weighted equally for multi-class? My dataset is ...
1
vote
0answers
20 views

Any way to print input and output data for each row during training in DL4J?

The score for my model is dropping far too fast. For a huge dataset it's declining from > 5 to 0 well before the first epoch is complete. I suspect I may have misconfigured it somehow and perhaps ...
0
votes
0answers
7 views

How to join two ComputationGraphs in DL4j?

I have two ComputationGraph instances: ComputationGraph encoder = KerasModelImport.importKerasModelAndWeights( this.getClass().getResource("encoder.h5").getPath(), false); ...
0
votes
0answers
42 views

DL4J - Sound (.wav input and .wav output)

I have a project which taking the small .wav file and process them. I'm trying to use dl4j, but the examples didn't help much and I don't know where to start. My first idea, converting the .wav file ...
0
votes
1answer
42 views

How can I concatenate mixed type input into multi layer network with deeplearning4j?

I have a dataset where some features are numerical, some categorical, and some are strings (e.g. description). To give an example, lets say I have three features: | Number | Type | Comment ...
0
votes
0answers
14 views

How to create an INDArray object after loading ComputationGraph from file?

I'm writting sample code for sentence classification using a CNN. I have trained my ComputationGraph and saved it to disk. When I load the network in the future, how would I create an INDArray object ...
0
votes
1answer
98 views

DeepLearning4j throwing “Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.” error

Recently i started to learn DeepLearning4j library , so i cloned a dl4j project and executed in eclipse. After executing , it showed following error: Intel MKL FATAL ERROR: Cannot load ...
0
votes
0answers
44 views

ND4J IEvaluation not found in deeplearning4j Scala project using Sonatype snapshots

In a Scala project using DL4J aiming to import a Keras model, my SBT contains the below to DL4J and ND4J dependencies from Sonatype snapshots. I am using Sonatype snapshots and not Maven due to DL4J ...
2
votes
2answers
81 views

Deeplearning4j (DL4J) low precision, recall and F1

I am going to use DL4J for finding a good model against a conditional matrix. I have prepared the CSV-like dataset (sample as at below) and after fine tuned the hyperparamaters and trained the model ...
1
vote
2answers
37 views

How to get the accuracy of classifier on test data in DeepLearning

I am trying to use DL4J for deep learning and have provided the training data with the labels. I am then trying to send a test data by assigning a dummy label. Without providing a dummy label, it ...
0
votes
1answer
116 views

Loading DL4J trained Word2Vec Model into gensim

Hello I have some word2vec models generated using Word2Vec java implementation in DL4J and saved by calling writeWord2VecModel(Word2Vec vectors, String path) The output of that is a zip file that ...
0
votes
0answers
132 views

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: <module name="org.nd4j.jackson" /> <module name="org.nd4j.nd4j-api" /> <...
1
vote
1answer
72 views

Different prediction: Keras vs. Android + DL4J

I experience vastly different prediction results when comparing the output of a neural network trained on a GPU in Python(3.5.5) + Keras (version 2.0.8), against the output of the same neural network ...
1
vote
0answers
553 views

Libraries not accessible for “classloader-namespace”, when loading DL4J model using restoreMultiLayerNetwork()

I cannot find out how to get rid of / solve the below errors, that occur when loading a Neural Network model using the DL4J method restoreMultiLayerNetwork using Android API >= 24: The errors occur ...
0
votes
1answer
162 views

Converting Dataframe from Spark to the type used by DL4j

Is there any convenient way to convert Dataframe from Spark to the type used by DL4j? Currently using Daraframe in algorithms with DL4j I get an error: "type mismatch, expected: RDD[DataSet], actual: ...
3
votes
2answers
200 views

Android: ZipFile() java.util.zip.ZipException: File too short to be a zip file: 0

I am working on a project (Using Android Studio 3.1.4) that reads in a neural network that is stored as a .zip file, for further use with DL4J in Android. I am trying to open this .zip file located ...
1
vote
0answers
163 views

Using DL4J in Scala and no backend found

I'm writing a simple scala project for dl4j. I need to switch between cuda (for training) and native for production. I seem to have a problem using native in an assembled jar. I get the below error:...
0
votes
0answers
40 views

DL4j - Neural Network that uses regressions with documents

I have figured out how to write a program that uses a Neural Network to classify a document as one of several discrete types (eg types of news articles). What I can't figure out how to do is make a ...
0
votes
0answers
21 views

Error opening video file using javacv (bundled with dl4j)

I'm using Dl4j 0.9.1 to learn neural networks and in the same project I need to read video from file. Dl4j comes with javacv. When I try to use standard javacv approach to read file using ...
0
votes
0answers
50 views

How to convert Mat image to INDArray?

I am working with opencv and wanted to put a mat image in the matrix, but as it is in the code below it is giving null return in the variable image, could someone help me? thank you. Mat digit = ...
0
votes
0answers
43 views

DL4j - is it possible to load a Word2Vec from a jar?

I have made a program that trains a ComputationGraph Convolutional Neural Network using a Word2Vec object to help. These are saved to files and can then be loaded by the program being run again later. ...
0
votes
1answer
49 views

Putting a ComputationGraph in the resources directory in a JAR DL4j

Under normal circumstances, I can save a ComputationGraph (a Convolutional Neural Network) to a file and load it in a later run and it works fine. However, when I include it in a jar and I try to ...
0
votes
1answer
36 views

DL4J - When using a ComputationGraph, is it possible to get the Class labels from it?

I saw how to do this from a DataSet object, and I saw a setLabel method, and I saw a getLabelMaskArrays, but none of these are what I'm looking for. Am I just blind or is there not a way? Thanks
0
votes
1answer
67 views

Parsing modified MNIST in the form of CSV for Conv Neural Network

I'm planning on using this modified version of MNIST for benchmarking research, but they are currently in .mat format. So, I've read on StackOverflow that MatlabRecordReader actually isn't that robust,...
0
votes
1answer
193 views

Semantic Segmentation using dl4j with FCN Networks

I have checked out dl4j examples and executed AnimalsClassification example for testing successfully. I have to train, evaluate and predict(use) a semantic segmentation algorithm like UNet, ...
0
votes
1answer
61 views

Reading recustructed vector from autoencoder in DL4J

My goal is to have an autoencoding network where I can train the identity function and then do forward passes yielding a reconstruction of the input. For this, I'm trying to use ...
0
votes
1answer
73 views

DL4J/ND4J: Can INDArray instance be reused?

I have a model to train on a large data set that does not fit into RAM. So, basically my plan is to slice the data set creating a DataSet instance with input vectors and associated labels for every ...
0
votes
0answers
185 views

Execution failed for task ':app:packageDebug'. > Failed to obtain compression information for entry

I'm getting this error while building my app. I couldn't find any relevant posts about this error... Error:Execution failed for task ':app:packageDebug'. > Failed to obtain compression ...
0
votes
0answers
27 views

dl4j spark example nativeio java.lang.NoSuchMethodError

I'm trying to run this project, but but I get this error Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.io.nativeio.NativeIO$Windows.createFileOutputStreamWithMode(...
0
votes
2answers
56 views

Error loading own data set. numClasses and InputSplit

Unexpected exception when load own dataset. The execution of the code from FeaturizedPreSave with just a minor change in the number of samples to be taken into consideration for the neural network ...
0
votes
1answer
98 views

How do I remove dummy variable trap with OneHotencoding

Here is my code for CSV data extraction and transformation: Schema schema = new Schema.Builder() .addColumnsString("RowNumber") .addColumnInteger("CustomerId") ....
0
votes
1answer
52 views

Solving DL4J compilation error

I am trying to download DL4J source without error. https://github.com/deeplearning4j/deeplearning4j I cloned https://github.com/deeplearning4j/deeplearning4j.git and imported using existing Maven ...
1
vote
0answers
74 views

Use DL4J for gradient descent

How DL4J can be used to run gradient descent on an expression such as 5 x y^2 – x z + 3 (for example) ? If it not possible, what library would you recommend to perform gradient descent (and ...
1
vote
0answers
204 views

Error during maven “clean install” with plug-in resolve

I try to to use clean install in Maven and get the error below. I have two questions: Is this an error to be solved with a fair amount of work or is it such an esoteric error, that any attempt to ...
1
vote
2answers
330 views

Jar files for DL4J - using DL4J without building using Maven

I want to use DL4J [https://deeplearning4j.org/] and tried the instructions on the setup guide [https://deeplearning4j.org/gettingstarted]. I am facing problems while building using Maven (build ...
0
votes
0answers
74 views

ND4J - RunTimeException caused by Nd4j.initWithBackend(Nd4j.java:6282)

I am trying to build a neural network using DL4J and ND4J but got a exception on this Code: package neuralnetwork; import org.deeplearning4j.nn.conf.MultiLayerConfiguration; import org....
0
votes
2answers
87 views

Error while loading model with RL4J

I'm using RL4J (the Reinforcement Learning framework integrated in DeepLearning4J) for making a car complete the lap in a track for a videogame. I save the the model after the training with this code:...
1
vote
0answers
36 views

How to matrix multiply 2 layers in dl4j

I'm very new to dl4j and I'm struggling to preform basic operations within a graph. As an example how would I preform a multiplication of the output of 2 layers. For example in the code below what ...
1
vote
0answers
16 views

How to transpose the output of the previous layer in dl4j

I am very new to dl4j and I can't seem to find a layer for transposing the output of the previous layer. Is this something that is supported in the project or do I need to make a custom layer?
0
votes
0answers
17 views

Build layer from many smaller/stacked layers dl4j

I am building a system which reads in a document and a question and answers the question from the context of the document. the first step is creating an attention mechanism to give weight to words ...
0
votes
0answers
132 views

Create a shared embedding layer and merge layer with DL4J

I am learning the DL4J API. I know there is a Word2Vec class already provided in addition to SequenceVectors, however I would like to understand more about creating embeddings that are shared. For ...
0
votes
1answer
39 views

DL4J: set “channels_first” config

I'm trying to load a pretrained Keras model into Java app using DL4J. When training in Keras I used "channels_first" image_data_format, and now, in DL4J I can not load my model properly, because it ...
0
votes
2answers
101 views

interate DataSetIterator and add intto DataSet

I want interate a DataSetIterator and add it into a DataSet. Iterate is easy: while (iterator.hasNext()) { DataSet next = iterator.next(); dataSet.addRow(next, dataSet.numExamples()); // isn'...
1
vote
1answer
340 views

Regression in DL4J - predict the next time-step

I have a multiLayer network trained, but I'm stuck on how to do a prediction for additional time-steps. I tried following the character iteration example by creating this method - public float[] ...
0
votes
2answers
277 views

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'...

http://mssss.yulina-kosm.ru