Questions tagged [deeplearning4j]
Deeplearning4j is 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.
392
questions
0
votes
0
answers
20
views
What's the psuedo code in SameDiff in Deeplearning4j?
Could anyone please help to implement below function in psuedo code in SameDiff in Deeplearning4j?
tf.keras.layers.experimental.EinsumDense( “…ik,ki->…i”, , ,)
0
votes
0
answers
34
views
I want to implement python trained .h5 model in java,but getting errors while importing it
String simpleMlp = new ClassPathResource(
"semantic.h5").getFile().getPath();
MultiLayerNetwork model = KerasModelImport.
...
0
votes
1
answer
189
views
How do I install/use nd4j?
I've been working on a project for a while and determined that it would be made much faster with the use of nd4j. I have spent many hours trying to use this library, but I always find more ...
0
votes
1
answer
67
views
Deeplearning4j - 1.0.0-M1.1 with Cuda - cudaGetSymbolAddress(...) failed error
I am getting the error as per showed in title. I have searched in Stackoverflow and other people have been through by the same problem in previous versions. In an answer was said that would be ...
-1
votes
2
answers
80
views
Different predictions for the same data
I use Deeplearning4j to classify equipment names. I marked ~ 50,000 items with 495 classes, and I use this data to train the neural network.
That is, as input, I provide a set of vectors (50,000) ...
0
votes
2
answers
61
views
Deeplearning4J nd4j-native.properties cannot be opened because it does not exist
When I used DL4J(version 1.0.0-M1.1) on android studio, it says that "nd4j-native.properties cannot be opened because it does not exist".However if I used on IDEA or the version was 1.0.0-...
-1
votes
1
answer
40
views
DL4J feature importance
I have build a LSTM neural network with multiple features with Deeplearning4j.
Now I want to know if a feature which I have added is good or not. I remember from other programming languages that there ...
0
votes
1
answer
27
views
Deeplearning4J MultiLayerConfiguration settings for a two class logistic regression model
I am attempting to build a two class logistic regression model but am unsure of the best method for a two class model.
I am working with data that looks like this:
Feature a
Feature b
Feature c
...
...
0
votes
1
answer
62
views
DL4J Load Array of Arrays as DataSet
If I want to load a DataSet from an array of doubles (e.g. {1, 2, 3, 4} in a text file with DL4j, I use this code:
int numLinesToSkip = 0;
char delimiter = ',';
String ...
1
vote
1
answer
59
views
Deeplearning4j LSTM (how to) add feature in original DL4J example (UCISequenceClassification)
want to adapt deeplearning4j example of UCISequenceClassification:
https://github.com/eclipse/deeplearning4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/quickstart/...
0
votes
0
answers
39
views
Export Word2Vec from dl4j to vector.tsv and metadata.tsv for tensorflow Embedding projector?
I have trained a Word2Vec embedding using deeplearning4j.
How can I export the resulting Word2Vec model to a vectors.tsv and metadata.tsv so I can visualize it using the https://projector.tensorflow....
0
votes
1
answer
72
views
DeepLearning4J: wrong shape of weights array
I have a model that was constructed and trained with Tensorflow in Python, and I need to use it in Java with Eclipse. Its configuration looks as follows:
### define model
model = keras.Sequential()
##...
2
votes
2
answers
145
views
Use in python trained tensorflow keras model in java for image recognition
I use keras in phyton to do my first steps in neuronal networks.
I trained a model to recognize small 30px x 30px images.
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow import ...
0
votes
1
answer
48
views
Reduce DeepLearning4j dependency size of exported jar
In my application, I would like to use Deeplearning4j. Deeplearning4j has over 120mb of dependencies, which is a lot considering my own code is only 0.5mb.
Is it possible to reduce the dependencies ...
0
votes
1
answer
69
views
How can I train my deep learning network with multiple parameters?
Currently, I have one array that I use for my deep learning network: "Cursor distance from target". That looks like this:
Data:
//Array of last 20 hits that occurred....0.2254129882770741,0....
0
votes
1
answer
181
views
Deeplearning4j - how to iterate multiple DataSets for large data?
I'm studying Deeplearning4j (ver. 1.0.0-M1.1) for building neural networks.
I use IrisClassifier from Deeplearning4j as an example, it works fine:
//First: get the dataset using the record reader. ...
0
votes
0
answers
426
views
deepfacelab ImportError: DLL load failed: The specified module could not be found
I'm here trying to use deepface lab and got stuck in this error while trying run second step:
Couldn't find how to solve this.
When I try to run step 2 Extract image from video data_src, I'm getting ...
0
votes
1
answer
227
views
Deeplearning4j - how to use saved model?
I'm studing Deeplearning4j (ver. 1.0.0-M1.1) for building neural networks.
I use IrisClassifier from Deeplearning4j as an example.
//First: get the dataset using the record reader. CSVRecordReader ...
0
votes
0
answers
40
views
how to make stacked Encoder-decoder in LSTM
I have below code and I want to make it stacked Encoder-decoder,how i can do that?
model=Sequential()
model.add(LSTM(n_neurons,activation='tanh',input_shape=(n_steps_in,n_features)))
model.add(...
-1
votes
2
answers
88
views
Why does my deep-learning model give this ValueError?
I am trying to create a deep learning model to identify person with mask or without mask but unfortunately i got this error
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/...
0
votes
0
answers
179
views
DL4j 1.0.0-M1.1 Very slow at run on CUDA
Updated from DL4J 1.0.0-beta7 to DL4j 1.0.0-M1.1.
It seems that the GPU is used in the backend, but the speed of learning and thinking has become unusually slow.
It seems to have slowed down more than ...
0
votes
1
answer
112
views
DeepLearning4j NN for prediction function doesn't converge
I'm trying to do a simple prediction in DL4j (going to use it later for a large dataset with n features) but no matter what I do my network just doesn't want to learn and behaves very weird. Of course ...
-1
votes
2
answers
237
views
facing problem in reshaping array of size 92200000 into shape (-1,100,100,3) and it work on (-1,100,100) but then i got another problem of input data
this was the error:
ValueError Traceback (most recent call last)
<ipython-input-56-84713bdbff2f> in <module>()
57
58
---> 59 base_model = tf....
0
votes
0
answers
23
views
In DL4J, is there a way to ignore columns for training/scoring without removing them so they can be accessed later?
In DL4J, is there a way to access the columns of preprocessed data after at the scoring step? I have a case where I have a csv of data that includes fields that are not used by the neural net for ...
0
votes
1
answer
127
views
Change this Python Keras code to DeepLearning4j code
So it looks like tensorflow for Python and the currently released Jython version aren't compatible, so I'm writing my AI model (a GAN) in Java. I'm following a python guide in Keras and Tensorflow for ...
0
votes
0
answers
240
views
How to resolve this error : RuntimeError: unexpected EOF, expected 1362420 more bytes. The file might be corrupted.`
I tried to execute loho.py
and I got this error
'''This is the error msg :
Setting up Perceptual loss... Loading model from: /content/LOHO/networks/lpips/weights/v0.1/vgg.pth ...[net-lin [vgg]] ...
1
vote
1
answer
41
views
Ask About The "default" Size of Vocabulary in Word2Vec in Deeplearning4j Library
I am currently learning about this library: Word2Vec from Deeplearning4j (Homepage, Github)
Following is the example usage of the method:
//build Word2Vec model
Word2Vec vec = new Word2Vec.Builder()
...
0
votes
1
answer
40
views
Create efficiently `DataSetIterator` out of large double[][] array
I have large (1M samples * 100 features) array of type double[][] loaded into memory and I need to create efficiently DataSetIterator (with random batches) to feed MultiLayerNetwork. How can I do that?...
1
vote
1
answer
3k
views
How to use LayerNormalization layer in a Keras sequential Model?
I am just getting into Keras and Tensor flow.
Im having a lot of problems adding an input normalization layer in a sequential model.
Now my model is ;
model = tf.keras.models.Sequential()
model.add(...
1
vote
0
answers
156
views
How to use LSTM with a 2d array with DeepLearning4j
i am trying to learn how to use LSTM with deeplearning4j lib.
I created a dummy scenario where i want to get an output (3 classes) based on data that i collected.
I got the data from here (http://www....
0
votes
1
answer
116
views
DeepLearning4J Doc2Vec input structure
As I see less than 500 questions related on deeplearning4J here and most years old, first a different question: is DL4J dead? Do I really have to deal with horrible, horrible Python just to build my ...
0
votes
1
answer
39
views
Preparing data for deeplearning4j
I want to predict classifications of data that has the form:
classifier;a textual description
e.g.
car;a vehicle with 4 wheels
house;a building with a roof
mouse;gray animal that frightens my mother
...
0
votes
1
answer
62
views
DeepLearning4J How can I add layers dynamically to a multi layer netowrk
I'm trying to test several combinations of multilayer networks, but the Network configuration Builder doesn't allow adding or removing layers after the build.
If someone can give me a hint, thanks in ...
0
votes
1
answer
106
views
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 ...
-1
votes
1
answer
93
views
MultiLayerNetwork saved in DL4J is not loading in Python
I have been working with neural networks in Deeplearning4j and needed to switch it to Python. To use the same model (MultiLayerNetwork in DL4J) I saved it as a .h5 file. Like this:
File newFile = new ...
1
vote
1
answer
104
views
Visualizing training progresss in deeplearning4j throws error when starting server
I was following this tutorial trying to visualize my models training progress:
https://deeplearning4j.konduit.ai/tuning-and-training/visualization
The simple code for the server setup is:
UIServer ...
0
votes
1
answer
30
views
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 ...
-1
votes
1
answer
65
views
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 ...
9
votes
2
answers
440
views
Neural Network returning NaN as output
I am trying to write my first neural network to play the game connect four.
Im using Java and deeplearning4j.
I tried to implement a genetic algorithm, but when i train the network for a while, the ...
0
votes
0
answers
118
views
TensorFlow Keras model cannot be loaded into Deeplearning4J due to custom layer
I have trained a TensorFlow Keras model in Python and saved it as trained_model.h5:
model = tf.keras.Sequential([hub.KerasLayer("https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4&...
0
votes
1
answer
89
views
How to apply MNIST trained NN on a big image
I have a Neural network (NN) in deeplearning4j trained with MNIST to recognise digits on an image. As MNIST set contains 28x28 pixel images, I am able to predict class of an 28x28 image using this NN.
...
0
votes
1
answer
91
views
Deeplearning4j DataSetIterator Reset not supported due to which model.fit() doesnot work
I am trying to run a classifier model on Cats and Dogs dataset. Every thing works fine till the code reaches Model.fit(dataSetIterator, eEpochs) step where as I found during Debug the dataSetIterator ...
1
vote
1
answer
191
views
DeepLearning4J Problems with INDArray
public void playFullGame(MultiLayerNetwork m1, MultiLayerNetwork m2) {
boolean player = false;
while (!this.isOver) {
float[] f = Main.rowsToInput(this.rows);
System.out....
3
votes
0
answers
70
views
Accessing weights and raw activations of all layers in deeplearning4j
My goal is to visualize a model classifying an image. For the visualization I need the raw activations / outputs of each layer. Is there a way to access these when predicting? Furthermore, it would be ...
0
votes
0
answers
84
views
How to train DeepLearning4J model Using a Java Object... Cant find assistance anywhere on this question
I am working on a Phrase Input and Response System (Similar to SIRI) want to train a Model on how to detect a phrase category, i.e. command, misc., special, using a Phrase[] Java object from Apache ...
2
votes
1
answer
280
views
How to split a DataSetIterator into testing and training iterator?
I am using Deeplearning4j and datavec, and I have a DataSetIterator object that represents all of my data, which is a time series. How can I split this into training and testing iterators? I check and ...
0
votes
1
answer
56
views
Deeplearning4j: How would I prepare this data for a RNN that uses LSTM?
In my code, I download data from a source to a CSV file, then I apply a transformation process to it, after which it is written to a final CSV file. At this point in time, one row of my data looks ...
0
votes
0
answers
137
views
QLearning network in a custom environment is choosing the same action every time, despite the heavy negative reward
So I plugged QLearningDiscreteDense into a dots and boxes game I made. I created a custom MDP environment for it. The problem is that it chooses action 0 each time, the first time it works but then it'...
0
votes
1
answer
257
views
Importing a gensim doc2vec model in deeplearning4j
I have trained a doc2vec model with gensim and like to import it into Deeplearning4j in order to deploy that model.
For word2vec models, I know that this is possible by saving the model with
model.wv....