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. |
default void |
update(java.lang.String parameterId,
NDArray[] params)
Updates the parameter of a key from Parameter Server.
|
void |
update(java.lang.String parameterId,
NDArray[] grads,
NDArray[] params)
Updates the parameter of a key from 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 parameterdefault void update(java.lang.String parameterId, NDArray[] params)
parameterId
- the key to identify the parameterparams
- the parameter NDArrays in different devices to be updated.void update(java.lang.String parameterId, NDArray[] grads, NDArray[] params)
parameterId
- the key to identify the parametergrads
- the gradient NDArrays in different devices to apply the update.params
- the parameter NDArrays in different devices to be updated.void close()
close
in interface java.lang.AutoCloseable