Skip to content

Instantly share code, notes, and snippets.

@rubenfiszel
Last active February 13, 2016 23:30
Show Gist options
  • Save rubenfiszel/adb35074329263a527df to your computer and use it in GitHub Desktop.
Save rubenfiszel/adb35074329263a527df to your computer and use it in GitHub Desktop.
val conf: MultiLayerConfiguration = new NeuralNetConfiguration.Builder()
.seed(seed)
.iterations(iterations)
.learningRate(1e-1f)
.optimizationAlgo(OptimizationAlgorithm.CONJUGATE_GRADIENT)
// .l1(1e-1).l2(2e-4)
// .useDropConnect(true)
.list(3)
.layer(0, new DenseLayer.Builder()
.nIn(50)
.nOut(24)
.weightInit(WeightInit.XAVIER)
.activation("relu")
.updater(Updater.NESTEROVS)
.build()
)
.layer(1, new DenseLayer.Builder()
.nIn(24)
.nOut(12)
.weightInit(WeightInit.XAVIER)
.activation("relu")
.updater(Updater.NESTEROVS)
.build()
)
.layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.RMSE_XENT)
.nIn(12)
.nOut(1)
.activation("sigmoid")
.build()
)
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment