Guest User

Untitled

a guest
Mar 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()
  2. .seed(12345)
  3. .iterations(1)
  4. .weightInit(WeightInit.XAVIER)
  5. .updater(Updater.ADAGRAD) // using default momentum 0.9?
  6. .activation(Activation.RELU)
  7. .optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
  8. .learningRate(0.05)
  9. .regularization(true).l2(0.0001)
  10. .list()
  11. .layer(0, new DenseLayer.Builder().nOut(10).build())
  12. .layer(1, new DenseLayer.Builder().nOut(10).build())
  13. .layer(2, new DenseLayer.Builder().nOut(10).build())
  14. .layer(3, new OutputLayer.Builder().lossFunction(LossFunctions.LossFunction.MSE).nOut(1).build())
  15. .setInputType(InputType.recurrent(3)) // makes all layers have .nIn(3)
  16. .pretrain(false)
  17. .backprop(true)
  18. .build()
Add Comment
Please, Sign In to add comment