Class SoftSyncParameterUpdater

    • Constructor Detail

      • SoftSyncParameterUpdater

        public SoftSyncParameterUpdater()
    • Method Detail

      • requiredUpdatesForPass

        public int requiredUpdatesForPass()
        Returns the number of required updates for a new pass
        Returns:
        the number of required updates for a new pass
      • status

        public Map<String,​Number> status()
        Returns the current status of this parameter server updater
        Returns:
      • toJson

        public String toJson()
        Serialize this updater as json
        Returns:
      • shouldReplicate

        public boolean shouldReplicate()
        Returns true if the updater has accumulated enough ndarrays to replicate to the workers
        Returns:
        true if replication should happen,false otherwise
      • update

        public void update​(NDArrayMessage message)
        Do an update based on the ndarray message.
        Parameters:
        message -
      • partialUpdate

        public void partialUpdate​(org.nd4j.linalg.api.ndarray.INDArray arr,
                                  org.nd4j.linalg.api.ndarray.INDArray result,
                                  long idx,
                                  int... dimensions)
        Updates result based on arr along a particular INDArray#tensorAlongDimension(int, int...)
        Parameters:
        arr - the array to update
        result - the result ndarray to update
        idx - the index to update
        dimensions - the dimensions to update
      • update

        public void update​(org.nd4j.linalg.api.ndarray.INDArray arr,
                           org.nd4j.linalg.api.ndarray.INDArray result)
        Updates result based on arr
        Parameters:
        arr - the array to update
        result - the result ndarray to update