Interface ParameterServer

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    LocalParameterServer

    public interface ParameterServer
    extends java.lang.AutoCloseable
    An interface for a key-value store to store parameters, and their corresponding gradients.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method 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.
    • Method Detail

      • init

        void init​(java.lang.String parameterId,
                  NDArray[] value)
        Initializes the ParameterStore for the given parameter.
        Parameters:
        parameterId - the parameter ID
        value - the values to be set for the given parameter
      • update

        default void update​(java.lang.String parameterId,
                            NDArray[] params)
        Updates the parameter of a key from Parameter Server.
        Parameters:
        parameterId - the key to identify the parameter
        params - the parameter NDArrays in different devices to be updated.
      • update

        void update​(java.lang.String parameterId,
                    NDArray[] grads,
                    NDArray[] params)
        Updates the parameter of a key from Parameter Server.
        Parameters:
        parameterId - the key to identify the parameter
        grads - the gradient NDArrays in different devices to apply the update.
        params - the parameter NDArrays in different devices to be updated.
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable