Search in sources :

Example 6 with BasicLayer

use of org.encog.neural.networks.layers.BasicLayer in project shifu by ShifuML.

the class DTrainTest method setup.

@BeforeTest
public void setup() {
    network = new BasicNetwork();
    network.addLayer(new BasicLayer(DTrainTest.INPUT_COUNT));
    network.addLayer(new BasicLayer(DTrainTest.HIDDEN_COUNT));
    network.addLayer(new BasicLayer(DTrainTest.OUTPUT_COUNT));
    network.getStructure().finalizeStructure();
    network.reset();
    weights = network.getFlat().getWeights();
    training = RandomTrainingFactory.generate(1000, 10000, INPUT_COUNT, OUTPUT_COUNT, -1, 1);
}
Also used : BasicNetwork(org.encog.neural.networks.BasicNetwork) BasicLayer(org.encog.neural.networks.layers.BasicLayer) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BasicLayer (org.encog.neural.networks.layers.BasicLayer)6 BasicNetwork (org.encog.neural.networks.BasicNetwork)4 ActivationLinear (org.encog.engine.network.activation.ActivationLinear)3 ActivationSigmoid (org.encog.engine.network.activation.ActivationSigmoid)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 BasicFloatNetwork (ml.shifu.shifu.core.dtrain.dataset.BasicFloatNetwork)1 FloatNeuralStructure (ml.shifu.shifu.core.dtrain.dataset.FloatNeuralStructure)1 HeWeightRandomizer (ml.shifu.shifu.core.dtrain.random.HeWeightRandomizer)1 LecunWeightRandomizer (ml.shifu.shifu.core.dtrain.random.LecunWeightRandomizer)1 XavierWeightRandomizer (ml.shifu.shifu.core.dtrain.random.XavierWeightRandomizer)1 ActivationLOG (org.encog.engine.network.activation.ActivationLOG)1 ActivationSIN (org.encog.engine.network.activation.ActivationSIN)1 ActivationTANH (org.encog.engine.network.activation.ActivationTANH)1 GaussianRandomizer (org.encog.mathutil.randomize.GaussianRandomizer)1 BasicMLDataSet (org.encog.ml.data.basic.BasicMLDataSet)1 NeuralNetworkError (org.encog.neural.NeuralNetworkError)1 FlatLayer (org.encog.neural.flat.FlatLayer)1 NeuralStructure (org.encog.neural.networks.structure.NeuralStructure)1 Propagation (org.encog.neural.networks.training.propagation.Propagation)1