public class PartitionTrainingFunction<T extends SequenceElement> extends java.lang.Object implements org.apache.spark.api.java.function.VoidFunction<java.util.Iterator<Sequence<T>>>
Modifier and Type | Field and Description |
---|---|
protected org.apache.spark.broadcast.Broadcast<VectorsConfiguration> |
configurationBroadcast |
protected org.nd4j.parameterserver.distributed.training.TrainingDriver<? extends org.nd4j.parameterserver.distributed.messages.TrainingMessage> |
driver |
protected SparkElementsLearningAlgorithm |
elementsLearningAlgorithm |
protected org.nd4j.parameterserver.distributed.VoidParameterServer |
paramServer |
protected org.apache.spark.broadcast.Broadcast<org.nd4j.parameterserver.distributed.conf.VoidConfiguration> |
paramServerConfigurationBroadcast |
protected SparkSequenceLearningAlgorithm |
sequenceLearningAlgorithm |
protected VocabCache<ShallowSequenceElement> |
shallowVocabCache |
protected VectorsConfiguration |
vectorsConfiguration |
protected org.apache.spark.broadcast.Broadcast<VocabCache<ShallowSequenceElement>> |
vocabCacheBroadcast |
Constructor and Description |
---|
PartitionTrainingFunction(org.apache.spark.broadcast.Broadcast<VocabCache<ShallowSequenceElement>> vocabCacheBroadcast,
org.apache.spark.broadcast.Broadcast<VectorsConfiguration> vectorsConfigurationBroadcast,
org.apache.spark.broadcast.Broadcast<org.nd4j.parameterserver.distributed.conf.VoidConfiguration> paramServerConfigurationBroadcast) |
Modifier and Type | Method and Description |
---|---|
void |
call(java.util.Iterator<Sequence<T>> sequenceIterator) |
protected void |
trainAllAtOnce(java.util.List<Sequence<ShallowSequenceElement>> sequences) |
protected org.apache.spark.broadcast.Broadcast<VocabCache<ShallowSequenceElement>> vocabCacheBroadcast
protected org.apache.spark.broadcast.Broadcast<VectorsConfiguration> configurationBroadcast
protected org.apache.spark.broadcast.Broadcast<org.nd4j.parameterserver.distributed.conf.VoidConfiguration> paramServerConfigurationBroadcast
protected transient org.nd4j.parameterserver.distributed.VoidParameterServer paramServer
protected transient VectorsConfiguration vectorsConfiguration
protected transient SparkElementsLearningAlgorithm elementsLearningAlgorithm
protected transient SparkSequenceLearningAlgorithm sequenceLearningAlgorithm
protected transient VocabCache<ShallowSequenceElement> shallowVocabCache
protected transient org.nd4j.parameterserver.distributed.training.TrainingDriver<? extends org.nd4j.parameterserver.distributed.messages.TrainingMessage> driver
public PartitionTrainingFunction(@NonNull org.apache.spark.broadcast.Broadcast<VocabCache<ShallowSequenceElement>> vocabCacheBroadcast, @NonNull org.apache.spark.broadcast.Broadcast<VectorsConfiguration> vectorsConfigurationBroadcast, @NonNull org.apache.spark.broadcast.Broadcast<org.nd4j.parameterserver.distributed.conf.VoidConfiguration> paramServerConfigurationBroadcast)
public void call(java.util.Iterator<Sequence<T>> sequenceIterator) throws java.lang.Exception
call
in interface org.apache.spark.api.java.function.VoidFunction<java.util.Iterator<Sequence<T extends SequenceElement>>>
java.lang.Exception
protected void trainAllAtOnce(java.util.List<Sequence<ShallowSequenceElement>> sequences)