Interface SequenceLearningAlgorithm<T extends SequenceElement>
-
public interface SequenceLearningAlgorithm<T extends SequenceElement>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(VocabCache<T> vocabCache, WeightLookupTable<T> lookupTable, VectorsConfiguration configuration)
void
finish()
String
getCodeName()
ElementsLearningAlgorithm<T>
getElementsLearningAlgorithm()
org.nd4j.linalg.api.ndarray.INDArray
inferSequence(Sequence<T> sequence, long nextRandom, double learningRate, double minLearningRate, int iterations)
This method does training on previously unseen paragraph, and returns inferred vectorboolean
isEarlyTerminationHit()
double
learnSequence(Sequence<T> sequence, AtomicLong nextRandom, double learningRate, BatchSequences<T> batchSequences)
This method does training over the sequence of elements passed into itvoid
pretrain(SequenceIterator<T> iterator)
-
-
-
Method Detail
-
getCodeName
String getCodeName()
-
configure
void configure(VocabCache<T> vocabCache, WeightLookupTable<T> lookupTable, VectorsConfiguration configuration)
-
pretrain
void pretrain(SequenceIterator<T> iterator)
-
learnSequence
double learnSequence(Sequence<T> sequence, AtomicLong nextRandom, double learningRate, BatchSequences<T> batchSequences)
This method does training over the sequence of elements passed into it- Parameters:
sequence
-nextRandom
-learningRate
-- Returns:
- average score for this sequence
-
isEarlyTerminationHit
boolean isEarlyTerminationHit()
-
inferSequence
org.nd4j.linalg.api.ndarray.INDArray inferSequence(Sequence<T> sequence, long nextRandom, double learningRate, double minLearningRate, int iterations)
This method does training on previously unseen paragraph, and returns inferred vector- Parameters:
sequence
-nextRandom
-learningRate
-- Returns:
-
getElementsLearningAlgorithm
ElementsLearningAlgorithm<T> getElementsLearningAlgorithm()
-
finish
void finish()
-
-