public interface ParameterServer
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
init(java.lang.String parameterId,
NDArray[] value)
Initializes the
ParameterStore for the given parameter. |
void |
pull(java.lang.String parameterId,
NDArray[] weights,
int priority)
Pulls the value of a key from Parameter Server to NDArrays.
|
void |
push(java.lang.String parameterId,
NDArray[] grads,
int priority)
Updates values of a key in Parameter Server.
|
void init(java.lang.String parameterId, NDArray[] value)
ParameterStore
for the given parameter.parameterId
- the parameter IDvalue
- the values to be set for the given parametervoid push(java.lang.String parameterId, NDArray[] grads, int priority)
parameterId
- the key to updategrads
- the values corresponding to the key, values in array will be summed when key is
updatedpriority
- the priority of the push operation. Higher priority push operations are
likely to be executed before other push actionsvoid pull(java.lang.String parameterId, NDArray[] weights, int priority)
parameterId
- the key to pullweights
- the NDArrays to store the value corresponding to the key, value will be copied
to the devices of the NDArrayspriority
- the priority of the push operation. Higher priority push operations are
likely to be executed before other push actionsvoid close()
close
in interface java.lang.AutoCloseable