Last active
October 19, 2015 17:25
-
-
Save ieee8023/9f4313f769e498ab5ac5 to your computer and use it in GitHub Desktop.
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
MultiLayerConfiguration.Builder builder = new NeuralNetConfiguration.Builder() | |
.seed(seed) | |
.batchSize(batchSize) | |
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT) | |
.list(3) | |
.layer(0, new ConvolutionLayer.Builder(5, 5) | |
.nIn(nChannels) | |
.nOut(6) | |
.weightInit(WeightInit.XAVIER) | |
.activation("relu") | |
.build()) | |
.layer(1, new SubsamplingLayer.Builder(SubsamplingLayer.PoolingType.MAX, new int[] {2,2}) | |
.build()) | |
.layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD) | |
.nOut(outputNum) | |
.weightInit(WeightInit.XAVIER) | |
.activation("softmax") | |
.build()) | |
.backprop(true).pretrain(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment