Java Code Examples for org.nd4j.linalg.lossfunctions.LossFunctions.LossFunction#SQUARED_LOSS
The following examples show how to use
org.nd4j.linalg.lossfunctions.LossFunctions.LossFunction#SQUARED_LOSS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestLossFunctionsSizeChecks.java From nd4j with Apache License 2.0 | 5 votes |
@Test public void testL2() { LossFunction[] lossFunctionList = {LossFunction.MSE, LossFunction.L1, LossFunction.EXPLL, LossFunction.XENT, LossFunction.MCXENT, LossFunction.SQUARED_LOSS, LossFunction.RECONSTRUCTION_CROSSENTROPY, LossFunction.NEGATIVELOGLIKELIHOOD, LossFunction.COSINE_PROXIMITY, LossFunction.HINGE, LossFunction.SQUARED_HINGE, LossFunction.KL_DIVERGENCE, LossFunction.MEAN_ABSOLUTE_ERROR, LossFunction.L2, LossFunction.MEAN_ABSOLUTE_PERCENTAGE_ERROR, LossFunction.MEAN_SQUARED_LOGARITHMIC_ERROR, LossFunction.POISSON}; testLossFunctions(lossFunctionList); }
Example 2
Source File: TestLossFunctionsSizeChecks.java From deeplearning4j with Apache License 2.0 | 5 votes |
@Test public void testL2() { LossFunction[] lossFunctionList = {LossFunction.MSE, LossFunction.L1, LossFunction.XENT, LossFunction.MCXENT, LossFunction.SQUARED_LOSS, LossFunction.RECONSTRUCTION_CROSSENTROPY, LossFunction.NEGATIVELOGLIKELIHOOD, LossFunction.COSINE_PROXIMITY, LossFunction.HINGE, LossFunction.SQUARED_HINGE, LossFunction.KL_DIVERGENCE, LossFunction.MEAN_ABSOLUTE_ERROR, LossFunction.L2, LossFunction.MEAN_ABSOLUTE_PERCENTAGE_ERROR, LossFunction.MEAN_SQUARED_LOGARITHMIC_ERROR, LossFunction.POISSON}; testLossFunctions(lossFunctionList); }
Example 3
Source File: MultiNeuralNetConfLayerBuilderTest.java From deeplearning4j with Apache License 2.0 | 5 votes |
@Test public void testNeuralNetConfigAPI() { LossFunction newLoss = LossFunction.SQUARED_LOSS; int newNumIn = numIn + 1; int newNumOut = numOut + 1; WeightInit newWeight = WeightInit.UNIFORM; double newDrop = 0.5; int[] newFS = new int[] {3, 3}; int newFD = 7; int[] newStride = new int[] {3, 3}; Convolution.Type newConvType = Convolution.Type.SAME; PoolingType newPoolType = PoolingType.AVG; double newCorrupt = 0.5; double newSparsity = 0.5; MultiLayerConfiguration multiConf1 = new NeuralNetConfiguration.Builder().list() .layer(0, new DenseLayer.Builder().nIn(newNumIn).nOut(newNumOut).activation(act) .build()) .layer(1, new DenseLayer.Builder().nIn(newNumIn + 1).nOut(newNumOut + 1) .activation(act).build()) .build(); NeuralNetConfiguration firstLayer = multiConf1.getConf(0); NeuralNetConfiguration secondLayer = multiConf1.getConf(1); assertFalse(firstLayer.equals(secondLayer)); }