public interface Gradient
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear residual parameters (useful for returning a gradient and then clearing old objects)
|
java.lang.Character |
flatteningOrderForVariable(java.lang.String variable)
Return the gradient flattening order for the specified variable, or null if it is not explicitly set
|
org.nd4j.linalg.api.ndarray.INDArray |
getGradientFor(java.lang.String variable)
The gradient for the given variable
|
org.nd4j.linalg.api.ndarray.INDArray |
gradient()
The full gradient as one flat vector
|
org.nd4j.linalg.api.ndarray.INDArray |
gradient(java.util.List<java.lang.String> order)
The full gradient as one flat vector
|
java.util.Map<java.lang.String,org.nd4j.linalg.api.ndarray.INDArray> |
gradientForVariable()
Gradient look up table
|
org.nd4j.linalg.api.ndarray.INDArray |
setGradientFor(java.lang.String variable,
org.nd4j.linalg.api.ndarray.INDArray gradient)
Update gradient for the given variable
|
org.nd4j.linalg.api.ndarray.INDArray |
setGradientFor(java.lang.String variable,
org.nd4j.linalg.api.ndarray.INDArray gradient,
java.lang.Character flatteningOrder)
Update gradient for the given variable; also (optionally) specify the order in which the array should be flattened
to a row vector
|
java.util.Map<java.lang.String,org.nd4j.linalg.api.ndarray.INDArray> gradientForVariable()
org.nd4j.linalg.api.ndarray.INDArray gradient(java.util.List<java.lang.String> order)
org.nd4j.linalg.api.ndarray.INDArray gradient()
void clear()
org.nd4j.linalg.api.ndarray.INDArray getGradientFor(java.lang.String variable)
variable
- the variable to get the gradient fororg.nd4j.linalg.api.ndarray.INDArray setGradientFor(java.lang.String variable, org.nd4j.linalg.api.ndarray.INDArray gradient)
variable
- the variable to get the gradient forgradient
- the gradient valuesorg.nd4j.linalg.api.ndarray.INDArray setGradientFor(java.lang.String variable, org.nd4j.linalg.api.ndarray.INDArray gradient, java.lang.Character flatteningOrder)
variable
- the variable to get the gradient forgradient
- the gradient valuesflatteningOrder
- the order in which gradients should be flattened (null ok - default)java.lang.Character flatteningOrderForVariable(java.lang.String variable)
variable
- Variable to return the gradient flattening order for