public interface GradientsAccumulator extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
applyUpdate(StepFunction function,
INDArray params,
INDArray updates,
boolean isFinalStep)
This method applies accumulated updates via given StepFunction
|
void |
applyUpdate(StepFunction function,
INDArray params,
INDArray updates,
double alpha)
This method applies accumulated updates via given StepFunction
|
IndexedTail |
getExternalSource() |
boolean |
hasAnything()
This method checks if there are any (probably external) updates available
|
void |
markExternalUpdates(boolean updatesAvailable)
This method allows to highlight early availability of updates
|
void |
receiveUpdate(INDArray array)
This method accepts updates suitable for StepFunction and puts them to the queue, which is used in backpropagation loop
PLEASE NOTE: array is expected to be ready for use and match params dimensionality
|
void |
reset()
This method resets all accumulated updates (if any)
|
void |
setExternalSource(IndexedTail source)
This method allows to pass external updates to accumulator, they will be populated across all workers using this GradientsAccumulator instance
|
void |
storeUpdate(INDArray array,
int iterationNumber,
int epochNumber)
This method accepts updates suitable for StepFunction, and accumulates/propagates it across all workers
|
void |
touch()
This method does initialization of given worker wrt Thread-Device Affinity
|
void setExternalSource(IndexedTail source)
source
- IndexedTail getExternalSource()
void applyUpdate(StepFunction function, INDArray params, INDArray updates, boolean isFinalStep)
function
- params
- void applyUpdate(StepFunction function, INDArray params, INDArray updates, double alpha)
function
- params
- void storeUpdate(INDArray array, int iterationNumber, int epochNumber)
array
- void receiveUpdate(INDArray array)
array
- void markExternalUpdates(boolean updatesAvailable)
updatesAvailable
- void reset()
void touch()
boolean hasAnything()
Copyright © 2019. All rights reserved.