public class ParameterServerListener extends Object implements NDArrayCallback
| Constructor and Description |
|---|
ParameterServerListener(int[] shape)
Shape of the ndarray
|
ParameterServerListener(int[] shape,
int updatesPerEpoch)
Shape of the ndarray
|
ParameterServerListener(int[] shape,
ParameterServerUpdater updater) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Do a final divide for averaging
|
void |
onNDArray(org.nd4j.linalg.api.ndarray.INDArray arr)
Setup an ndarray
|
void |
onNDArrayMessage(NDArrayMessage message)
A listener for ndarray message
|
void |
onNDArrayPartial(org.nd4j.linalg.api.ndarray.INDArray arr,
long idx,
int... dimensions)
Used for partial updates using tensor along
dimension
|
public ParameterServerListener(int[] shape,
int updatesPerEpoch)
shape - the shape of the arrayupdatesPerEpoch - the number of updates per epoch
for synchronizationpublic ParameterServerListener(int[] shape)
shape - the shape of the arraypublic ParameterServerListener(int[] shape,
ParameterServerUpdater updater)
shape - the shape of the arrayupdater - the updater to use for this serverpublic void onNDArrayMessage(NDArrayMessage message)
onNDArrayMessage in interface NDArrayCallbackmessage - the message for the callbackpublic void onNDArrayPartial(org.nd4j.linalg.api.ndarray.INDArray arr, long idx, int... dimensions)
onNDArrayPartial in interface NDArrayCallbackarr - the array to count as an updateidx - the index for the tensor along dimensiondimensions - the dimensions to act on for the tensor along dimensionpublic void onNDArray(org.nd4j.linalg.api.ndarray.INDArray arr)
onNDArray in interface NDArrayCallbackarr - public void finish()
Copyright © 2021. All rights reserved.