This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hiddenWidth = 20; | |
MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder() | |
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT).iterations(1) | |
.learningRate(0.05476383804339002) // 0.02 with BPTT | |
.momentum(0.5358333571512998) | |
.seed(12345) | |
.regularization(true) | |
.l2(0.016384859214629816) | |
.dropOut(0.8145498131858961) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SerializationUtils { | |
private final Logger logger = LoggerFactory.getLogger(getClass()); | |
private String modelPath; | |
private String modelName; | |
private String normalizerPath; | |
private String configName; | |
public SerializationUtils(String modelPath, String modelName, String normalizerPath) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TrainExample { | |
public static final int BATCH_SIZE = 100; | |
public static final int N_EPOCHS = 150; | |
public static void main(String... args) { | |
// define some paths where you would like to store the model | |
String modelPath = "data" + File.separator + "models" + File.separator; | |
String normalizerPath = "data" + File.separator + "normalizers" + File.separator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EvaluationExample { | |
public static void main(String... args) { | |
// where are the trained model and the corresponding normalizers stored ? | |
String modelPath = "data" + File.separator + "models" + File.separator; | |
String normalizerPath = "data" + File.separator + "normalizers" + File.separator; | |
String modelName = "train.model"; | |
// define the paths to the train features, test features and test labels |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 | |
9 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 | |
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.issue2548; | |
import org.deeplearning4j.nn.multilayer.MultiLayerNetwork; | |
import org.nd4j.linalg.api.buffer.DataBuffer; | |
import org.nd4j.linalg.api.buffer.util.DataTypeUtil; | |
import org.nd4j.linalg.api.ndarray.INDArray; | |
import org.nd4j.linalg.dataset.api.preprocessor.NormalizerStandardize; | |
import org.nd4j.linalg.factory.Nd4j; | |
import java.io.BufferedReader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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.dl4j.test.project</groupId> | |
<artifactId>dl4j-lib</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<name>DL Lib</name> | |
<description>Forecasting lib using dl4j</description> | |
<properties> |