public interface Gradient extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear residual parameters (useful for returning a gradient and then clearing old objects)
|
Character |
flatteningOrderForVariable(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(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(List<String> order)
The full gradient as one flat vector
|
Map<String,org.nd4j.linalg.api.ndarray.INDArray> |
gradientForVariable()
Gradient look up table
|
org.nd4j.linalg.api.ndarray.INDArray |
setGradientFor(String variable,
org.nd4j.linalg.api.ndarray.INDArray gradient)
Update gradient for the given variable
|
org.nd4j.linalg.api.ndarray.INDArray |
setGradientFor(String variable,
org.nd4j.linalg.api.ndarray.INDArray gradient,
Character flatteningOrder)
Update gradient for the given variable; also (optionally) specify the order in which the array should be flattened
to a row vector
|
Map<String,org.nd4j.linalg.api.ndarray.INDArray> gradientForVariable()
org.nd4j.linalg.api.ndarray.INDArray gradient(List<String> order)
org.nd4j.linalg.api.ndarray.INDArray gradient()
void clear()
org.nd4j.linalg.api.ndarray.INDArray getGradientFor(String variable)
variable
- the variable to get the gradient fororg.nd4j.linalg.api.ndarray.INDArray setGradientFor(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(String variable, org.nd4j.linalg.api.ndarray.INDArray gradient, Character flatteningOrder)
variable
- the variable to get the gradient forgradient
- the gradient valuesflatteningOrder
- the order in which gradients should be flattened (null ok - default)Character flatteningOrderForVariable(String variable)
variable
- Variable to return the gradient flattening order forCopyright © 2017. All rights reserved.