Class InMemoryUpdateStorage
- java.lang.Object
-
- org.nd4j.parameterserver.updater.storage.BaseUpdateStorage
-
- org.nd4j.parameterserver.updater.storage.InMemoryUpdateStorage
-
- All Implemented Interfaces:
UpdateStorage
public class InMemoryUpdateStorage extends BaseUpdateStorage
-
-
Constructor Summary
Constructors Constructor Description InMemoryUpdateStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUpdate(NDArrayMessage array)Add an ndarray to the storagevoidclear()Clear the array storageNDArrayMessagedoGetUpdate(int index)A method for actually performing the implementation of retrieving the ndarrayintnumUpdates()The number of updates added to the update storage-
Methods inherited from class org.nd4j.parameterserver.updater.storage.BaseUpdateStorage
close, getUpdate
-
-
-
-
Method Detail
-
addUpdate
public void addUpdate(NDArrayMessage array)
Add an ndarray to the storage- Parameters:
array- the array to add
-
numUpdates
public int numUpdates()
The number of updates added to the update storage- Returns:
-
clear
public void clear()
Clear the array storage
-
doGetUpdate
public NDArrayMessage doGetUpdate(int index)
A method for actually performing the implementation of retrieving the ndarray- Specified by:
doGetUpdatein classBaseUpdateStorage- Parameters:
index- the index of theINDArrayto get- Returns:
- the ndarray at the specified index
-
-