public class LossUtil extends Object
Constructor and Description |
---|
LossUtil() |
Modifier and Type | Method and Description |
---|---|
static INDArray |
dLdZsoftmax(INDArray dlda,
INDArray a)
Calculate dL/dz for softmax activation function, from dL/da and a, where
a: output activations dL/da: derivative of loss function with respect to the output activations Note: This version does NOT modify either input arrays. |
static INDArray |
dLdZsoftmaxi(INDArray dlda,
INDArray a)
Calculate dL/dz for softmax activation function, from dL/da and a, where
a: output activations dL/da: derivative of loss function with respect to the output activations Note: This version WILL modify both input arrays (for efficiency). |
static INDArray |
dLdZsoftmaxPreOut(INDArray dlda,
INDArray z) |
public static INDArray dLdZsoftmax(INDArray dlda, INDArray a)
dLdZsoftmaxi(INDArray, INDArray)
.dlda
- derivative of loss function with respect to the output activations (shape [minibatchSize, nOut])a
- output activations array (shape [minibatchSize, nOut])public static INDArray dLdZsoftmaxi(INDArray dlda, INDArray a)
dLdZsoftmax(INDArray, INDArray)
.dlda
- derivative of loss function with respect to the output activations (shape [minibatchSize, nOut])a
- output activations array (shape [minibatchSize, nOut])Copyright © 2016. All Rights Reserved.