Class ParameterServerListener

    • Constructor Detail

      • ParameterServerListener

        public ParameterServerListener​(int[] shape,
                                       int updatesPerEpoch)
        Shape of the ndarray
        Parameters:
        shape - the shape of the array
        updatesPerEpoch - the number of updates per epoch for synchronization
      • ParameterServerListener

        public ParameterServerListener​(int[] shape)
        Shape of the ndarray
        Parameters:
        shape - the shape of the array
      • ParameterServerListener

        public ParameterServerListener​(int[] shape,
                                       ParameterServerUpdater updater)
        Parameters:
        shape - the shape of the array
        updater - the updater to use for this server
    • Method Detail

      • onNDArrayPartial

        public void onNDArrayPartial​(org.nd4j.linalg.api.ndarray.INDArray arr,
                                     long idx,
                                     int... dimensions)
        Used for partial updates using tensor along dimension
        Specified by:
        onNDArrayPartial in interface NDArrayCallback
        Parameters:
        arr - the array to count as an update
        idx - the index for the tensor along dimension
        dimensions - the dimensions to act on for the tensor along dimension
      • onNDArray

        public void onNDArray​(org.nd4j.linalg.api.ndarray.INDArray arr)
        Setup an ndarray
        Specified by:
        onNDArray in interface NDArrayCallback
        Parameters:
        arr -
      • finish

        public void finish()
        Do a final divide for averaging