Skip to content

Instantly share code, notes, and snippets.

MultiLayerConfiguration.Builder builder = new NeuralNetConfiguration.Builder()
.seed(seed)
.iterations(iterations)
.regularization(true).l2(0.0005)
.learningRate(0.01)//.biasLearningRate(0.02)
//.learningRateDecayPolicy(LearningRatePolicy.Inverse).lrPolicyDecayRate(0.001).lrPolicyPower(0.75)
.weightInit(WeightInit.XAVIER)
.gradientNormalization(GradientNormalization.RenormalizeL2PerLayer)
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
.updater(Updater.NESTEROVS).momentum(0.9)
I create the iterator in this way:
private static DataSetIterator createDatasetIterator(int batchSize, int numBatches, List<MyData> DB) {
List<DataSet> datasetList = new ArrayList<>();
for (int i = 0; i < numBatches; i++) {
datasetList.add(createDataset(batchSize, i * batchSize, DB)); //It simply takes different portions of my data
}
ListDataSetIterator listDataSetIterator = new ListDataSetIterator(datasetList,1); //I have also tried with 2,3,4,5.. nothing changed
while (listDataSetIterator.hasNext()) {
DataSet next = listDataSetIterator.next();
13:55:21.217 [main] DEBUG org.reflections.Reflections - could not scan file org/nd4j/nativeblas/linux-x86_64/libgomp.so.1 in url jar:file:/home/fab/.m2/repository/org/nd4j/nd4j-native/0.4-rc3.10/nd4j-native-0.4-rc3.10-linux-x86_64.jar!/ with scanner SubTypesScanner
13:55:21.218 [main] DEBUG org.reflections.Reflections - could not scan file org/nd4j/nativeblas/linux-x86_64/libgomp.so.1 in url jar:file:/home/fab/.m2/repository/org/nd4j/nd4j-native/0.4-rc3.10/nd4j-native-0.4-rc3.10-linux-x86_64.jar!/ with scanner TypeAnnotationsScanner
13:55:21.218 [main] DEBUG org.reflections.Reflections - could not scan file org/nd4j/nativeblas/linux-x86_64/libgfortran.so.3 in url jar:file:/home/fab/.m2/repository/org/nd4j/nd4j-native/0.4-rc3.10/nd4j-native-0.4-rc3.10-linux-x86_64.jar!/ with scanner SubTypesScanner
13:55:21.218 [main] DEBUG org.reflections.Reflections - could not scan file org/nd4j/nativeblas/linux-x86_64/libgfortran.so.3 in url jar:file:/home/fab/.m2/repository/org/nd4j/nd4j-native/0.4-rc3.10/nd4j-native-0.4-
SECOND EXECUTION POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>MouseStuff</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
cd /home/fab/NetBeansProjects/DeepLearning/MouseStuff; JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 /home/fab/netbeans-8.0/java/maven/bin/mvn clean install
Scanning for projects...
------------------------------------------------------------------------
Building MouseStuff 1.0-SNAPSHOT
------------------------------------------------------------------------
--- maven-clean-plugin:2.4.1:clean (default-clean) @ MouseStuff ---
Deleting /home/fab/NetBeansProjects/DeepLearning/MouseStuff/target