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
|
INDArray |
getGradientFor(String variable)
The gradient for the given variable
|
INDArray |
gradient()
The full gradient as one flat vector
|
INDArray |
gradient(List<String> order)
The full gradient as one flat vector
|
Map<String,INDArray> |
gradientForVariable()
Gradient look up table
|
INDArray |
setGradientFor(String variable,
INDArray gradient)
Update gradient for the given variable
|
INDArray |
setGradientFor(String variable,
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,INDArray> gradientForVariable()
INDArray gradient()
void clear()
INDArray getGradientFor(String variable)
variable
- the variable to get the gradient forINDArray setGradientFor(String variable, INDArray gradient)
variable
- the variable to get the gradient forgradient
- the gradient valuesINDArray setGradientFor(String variable, 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 © 2021. All rights reserved.