Package org.nd4j.parameterserver.updater
Class BaseParameterUpdater
- java.lang.Object
-
- org.nd4j.parameterserver.updater.BaseParameterUpdater
-
- All Implemented Interfaces:
ParameterServerUpdater
- Direct Known Subclasses:
SoftSyncParameterUpdater,SynchronousParameterUpdater,TimeDelayedParameterUpdater
public abstract class BaseParameterUpdater extends Object implements ParameterServerUpdater
-
-
Field Summary
Fields Modifier and Type Field Description protected NDArrayHolderndArrayHolderprotected UpdateStorageupdateStorage
-
Constructor Summary
Constructors Constructor Description BaseParameterUpdater()Initializes this updater withInMemoryUpdateStorageBaseParameterUpdater(UpdateStorage updateStorage)Initialize this updater with a custom update storageBaseParameterUpdater(UpdateStorage updateStorage, NDArrayHolder ndArrayHolder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAsync()Returns true if the given updater is async or synchronous updatesbooleanisReady()Returns true if the updater is ready for a new arrayNDArrayHolderndArrayHolder()Get the ndarray holder for this updaterintnumUpdates()Num updates passed through the updatervoidreset()Reset internal counters such as number of updates accumulated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nd4j.parameterserver.updater.ParameterServerUpdater
partialUpdate, requiredUpdatesForPass, shouldReplicate, status, toJson, update, update
-
-
-
-
Field Detail
-
updateStorage
protected UpdateStorage updateStorage
-
ndArrayHolder
protected NDArrayHolder ndArrayHolder
-
-
Constructor Detail
-
BaseParameterUpdater
public BaseParameterUpdater(UpdateStorage updateStorage, NDArrayHolder ndArrayHolder)
-
BaseParameterUpdater
public BaseParameterUpdater(UpdateStorage updateStorage)
Initialize this updater with a custom update storage- Parameters:
updateStorage- the update storage to use
-
BaseParameterUpdater
public BaseParameterUpdater()
Initializes this updater withInMemoryUpdateStorage
-
-
Method Detail
-
isReady
public boolean isReady()
Returns true if the updater is ready for a new array- Specified by:
isReadyin interfaceParameterServerUpdater- Returns:
-
isAsync
public boolean isAsync()
Returns true if the given updater is async or synchronous updates- Specified by:
isAsyncin interfaceParameterServerUpdater- Returns:
- true if the given updater is async or synchronous updates
-
ndArrayHolder
public NDArrayHolder ndArrayHolder()
Get the ndarray holder for this updater- Specified by:
ndArrayHolderin interfaceParameterServerUpdater- Returns:
- the ndarray holder for this updater
-
reset
public void reset()
Reset internal counters such as number of updates accumulated.- Specified by:
resetin interfaceParameterServerUpdater
-
numUpdates
public int numUpdates()
Num updates passed through the updater- Specified by:
numUpdatesin interfaceParameterServerUpdater- Returns:
- the number of updates
-
-