public class SynchronousParameterUpdater extends BaseParameterUpdater
ndArrayHolder, updateStorage| Constructor and Description |
|---|
SynchronousParameterUpdater(int workers)
Initializes this updater
with
InMemoryUpdateStorage |
SynchronousParameterUpdater(UpdateStorage updateStorage,
int workers)
Initialize this updater
with a custom update storage
|
SynchronousParameterUpdater(UpdateStorage updateStorage,
NDArrayHolder ndArrayHolder,
int workers) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAsync()
Returns true if the
given updater is async
or synchronous
updates
|
void |
partialUpdate(org.nd4j.linalg.api.ndarray.INDArray arr,
org.nd4j.linalg.api.ndarray.INDArray result,
long idx,
int... dimensions)
Updates result
based on arr along a particular
INDArray#tensorAlongDimension(int, int...) |
int |
requiredUpdatesForPass()
Returns the number of required
updates for a new pass
|
boolean |
shouldReplicate()
Returns true if
the updater has accumulated enough ndarrays to
replicate to the workers
|
Map<String,Number> |
status()
Returns the current status of this parameter server
updater
|
String |
toJson()
Serialize this updater as json
|
void |
update(org.nd4j.linalg.api.ndarray.INDArray arr,
org.nd4j.linalg.api.ndarray.INDArray result)
Updates result
based on arr
|
void |
update(NDArrayMessage message)
Do an update based on the ndarray message.
|
isReady, ndArrayHolder, numUpdates, resetpublic SynchronousParameterUpdater(UpdateStorage updateStorage, NDArrayHolder ndArrayHolder, int workers)
updateStorage - ndArrayHolder - workers - public SynchronousParameterUpdater(UpdateStorage updateStorage, int workers)
updateStorage - the update storage to usepublic SynchronousParameterUpdater(int workers)
InMemoryUpdateStoragepublic int requiredUpdatesForPass()
public boolean isAsync()
isAsync in interface ParameterServerUpdaterisAsync in class BaseParameterUpdaterpublic Map<String,Number> status()
public String toJson()
public boolean shouldReplicate()
public void update(NDArrayMessage message)
message - public void partialUpdate(org.nd4j.linalg.api.ndarray.INDArray arr, org.nd4j.linalg.api.ndarray.INDArray result, long idx, int... dimensions)
INDArray#tensorAlongDimension(int, int...)arr - the array to updateresult - the result ndarray to updateidx - the index to updatedimensions - the dimensions to updatepublic void update(org.nd4j.linalg.api.ndarray.INDArray arr, org.nd4j.linalg.api.ndarray.INDArray result)
arr - the array to updateresult - the result ndarray to updateCopyright © 2021. All rights reserved.