Package | Description |
---|---|
org.nd4j.linalg.activations | |
org.nd4j.linalg.activations.impl | |
org.nd4j.linalg.lossfunctions | |
org.nd4j.linalg.lossfunctions.impl |
Modifier and Type | Class and Description |
---|---|
class |
BaseActivationFunction
Base IActivation for activation functions without parameters
|
Modifier and Type | Method and Description |
---|---|
IActivation |
Activation.getActivationFunction()
Creates an instance of the activation function
|
Modifier and Type | Class and Description |
---|---|
class |
ActivationCube
f(x) = x^3
|
class |
ActivationELU
f(x) = alpha * (exp(x) - 1.0); x < 0
= x ; x>= 0
alpha defaults to 1, if not specified
|
class |
ActivationHardSigmoid
f(x) = min(1, max(0, 0.2*x + 0.5))
|
class |
ActivationHardTanH
??? 1, if x > 1
f(x) = ??? -1, if x < -1
??? x, otherwise
|
class |
ActivationIdentity
f(x) = x
|
class |
ActivationLReLU
Leaky RELU
f(x) = max(0, x) + alpha * min(0, x)
alpha defaults to 0.01
|
class |
ActivationRationalTanh
Rational tanh approximation
From https://arxiv.org/pdf/1508.01292v3
f(x) = 1.7159 * tanh(2x/3)
where tanh is approximated as follows,
tanh(y) ~ sgn(y) * { 1 - 1/(1+|y|+y^2+1.41645*y^4)}
Underlying implementation is in native code
|
class |
ActivationRectifiedTanh
Rectified tanh
Essentially max(0, tanh(x))
Underlying implementation is in native code
|
class |
ActivationReLU
f(x) = max(0, x)
|
class |
ActivationRReLU
f(x) = max(0,x) + alpha * min(0, x)
alpha is drawn from uniform(l,u) during training and is set to l+u/2 during test
l and u default to 1/8 and 1/3 respectively
Empirical Evaluation of Rectified Activations in Convolutional Network
|
class |
ActivationSELU
https://arxiv.org/pdf/1706.02515.pdf
|
class |
ActivationSigmoid
f(x) = 1 / (1 + exp(-x))
|
class |
ActivationSoftmax
f_i(x) = exp(x_i - shift) / sum_j exp(x_j - shift)
where shift = max_i(x_i)
|
class |
ActivationSoftPlus
f(x) = log(1+e^x)
|
class |
ActivationSoftSign
f_i(x) = x_i / (1+|x_i|)
|
class |
ActivationSwish
f(x) = x * sigmoid(x)
|
class |
ActivationTanH
f(x) = (exp(x) - exp(-x)) / (exp(x) + exp(-x))
|
Modifier and Type | Method and Description |
---|---|
INDArray |
ILossFunction.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask)
Compute the gradient of the loss function with respect to the inputs: dL/dOutput
|
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
ILossFunction.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average)
Compute both the score (loss function value) and gradient.
|
double |
ILossFunction.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average)
Compute the score (loss function value) for the given inputs.
|
INDArray |
ILossFunction.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask)
Compute the score (loss function value) for each example individually.
|
Modifier and Type | Method and Description |
---|---|
INDArray |
LossMSE.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossHinge.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossL1.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMSLE.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossPoisson.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMAPE.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossBinaryXENT.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMAE.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMixtureDensity.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask)
This method returns the gradient of the cost function with respect to the
output from the previous layer.
|
INDArray |
LossKLD.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMultiLabel.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossSquaredHinge.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMCXENT.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossFMeasure.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossCosineProximity.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossL2.computeGradient(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossHinge.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossL1.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossMSLE.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossPoisson.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossMAPE.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossBinaryXENT.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossMixtureDensity.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossKLD.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossMultiLabel.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossSquaredHinge.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossMCXENT.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossFMeasure.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossCosineProximity.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
org.nd4j.linalg.primitives.Pair<Double,INDArray> |
LossL2.computeGradientAndScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMSE.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossHinge.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossL1.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMSLE.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossPoisson.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMAPE.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossBinaryXENT.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMAE.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMixtureDensity.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average)
Computes the aggregate score as a sum of all of the individual scores of
each of the labels against each of the outputs of the network.
|
double |
LossKLD.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMultiLabel.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossSquaredHinge.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossMCXENT.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossFMeasure.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossCosineProximity.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
double |
LossL2.computeScore(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask,
boolean average) |
INDArray |
LossMSE.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossHinge.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossL1.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMSLE.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossPoisson.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMAPE.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossBinaryXENT.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMAE.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMixtureDensity.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask)
This method returns the score for each of the given outputs against the
given set of labels.
|
INDArray |
LossKLD.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMultiLabel.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossSquaredHinge.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMCXENT.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossFMeasure.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossCosineProximity.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossL2.computeScoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossHinge.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossL1.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMSLE.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossPoisson.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMAPE.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossMultiLabel.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossSquaredHinge.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
INDArray |
LossCosineProximity.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
protected INDArray |
LossL2.scoreArray(INDArray labels,
INDArray preOutput,
IActivation activationFn,
INDArray mask) |
Copyright © 2018. All rights reserved.