Class EncodedGradientsAccumulator.Builder
- java.lang.Object
-
- org.deeplearning4j.optimize.solvers.accumulation.EncodedGradientsAccumulator.Builder
-
- Enclosing class:
- EncodedGradientsAccumulator
public static class EncodedGradientsAccumulator.Builder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
boundary
protected boolean
encodingDebugMode
protected MessageHandler
handler
protected long
initialMemory
protected int
parties
protected int
queueSize
protected ResidualPostProcessor
residualPostProcessor
protected ThresholdAlgorithm
thresholdAlgorithm
-
Constructor Summary
Constructors Constructor Description Builder(int parties)
This
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncodedGradientsAccumulator
build()
EncodedGradientsAccumulator.Builder
encodingDebugMode(boolean enable)
EncodedGradientsAccumulator.Builder
memoryParameters(long initialMemory, int queueSize)
This method allows to define buffer memory parameters for this GradientsAccumulator Default values: 100MB initialMemory, 5 queueSizeEncodedGradientsAccumulator.Builder
messageHandler(@NonNull MessageHandler handler)
This method allows to specify MessageHandler instance Default value: EncodingHandlerEncodedGradientsAccumulator.Builder
residualPostProcessor(ResidualPostProcessor residualPostProcessor)
Set the residual post processorEncodedGradientsAccumulator.Builder
thresholdAlgorithm(ThresholdAlgorithm thresholdAlgorithm)
This method allows to set the ThresholdAlgorithm to be used for determining the thresholdEncodedGradientsAccumulator.Builder
updatesBoundary(int boundary)
This method enables optional limit for max number of updates per message Default value: Integer.MAX_VALUE (no limit)
-
-
-
Field Detail
-
parties
protected int parties
-
thresholdAlgorithm
protected ThresholdAlgorithm thresholdAlgorithm
-
residualPostProcessor
protected ResidualPostProcessor residualPostProcessor
-
initialMemory
protected long initialMemory
-
queueSize
protected int queueSize
-
handler
protected MessageHandler handler
-
boundary
protected int boundary
-
encodingDebugMode
protected boolean encodingDebugMode
-
-
Method Detail
-
messageHandler
public EncodedGradientsAccumulator.Builder messageHandler(@NonNull @NonNull MessageHandler handler)
This method allows to specify MessageHandler instance Default value: EncodingHandler- Parameters:
handler
-- Returns:
-
thresholdAlgorithm
public EncodedGradientsAccumulator.Builder thresholdAlgorithm(ThresholdAlgorithm thresholdAlgorithm)
This method allows to set the ThresholdAlgorithm to be used for determining the threshold- Returns:
-
residualPostProcessor
public EncodedGradientsAccumulator.Builder residualPostProcessor(ResidualPostProcessor residualPostProcessor)
Set the residual post processor
-
updatesBoundary
public EncodedGradientsAccumulator.Builder updatesBoundary(int boundary)
This method enables optional limit for max number of updates per message Default value: Integer.MAX_VALUE (no limit)- Parameters:
boundary
- positive value in range 0..1- Returns:
-
memoryParameters
public EncodedGradientsAccumulator.Builder memoryParameters(long initialMemory, int queueSize)
This method allows to define buffer memory parameters for this GradientsAccumulator Default values: 100MB initialMemory, 5 queueSize- Parameters:
initialMemory
-queueSize
-- Returns:
-
encodingDebugMode
public EncodedGradientsAccumulator.Builder encodingDebugMode(boolean enable)
-
build
public EncodedGradientsAccumulator build()
-
-