public static class CnnSentenceDataSetIterator.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CnnSentenceDataSetIterator |
build() |
CnnSentenceDataSetIterator.Builder |
dataSetPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor dataSetPreProcessor)
Optional DataSetPreProcessor
|
CnnSentenceDataSetIterator.Builder |
maxSentenceLength(int maxSentenceLength)
Maximum sentence/document length.
|
CnnSentenceDataSetIterator.Builder |
minibatchSize(int minibatchSize)
Minibatch size to use for the DataSetIterator
|
CnnSentenceDataSetIterator.Builder |
sentenceProvider(LabelAwareDocumentIterator iterator,
java.util.List<java.lang.String> labels)
Specify how the (labelled) sentences / documents should be provided
|
CnnSentenceDataSetIterator.Builder |
sentenceProvider(LabelAwareIterator iterator,
java.util.List<java.lang.String> labels)
Specify how the (labelled) sentences / documents should be provided
|
CnnSentenceDataSetIterator.Builder |
sentenceProvider(LabelAwareSentenceIterator iterator,
java.util.List<java.lang.String> labels)
Specify how the (labelled) sentences / documents should be provided
|
CnnSentenceDataSetIterator.Builder |
sentenceProvider(LabeledSentenceProvider labeledSentenceProvider)
Specify how the (labelled) sentences / documents should be provided
|
CnnSentenceDataSetIterator.Builder |
sentencesAlongHeight(boolean sentencesAlongHeight)
If true (default): output features data with shape [minibatchSize, 1, maxSentenceLength, wordVectorSize]
If false: output features with shape [minibatchSize, 1, wordVectorSize, maxSentenceLength] |
CnnSentenceDataSetIterator.Builder |
tokenizerFactory(TokenizerFactory tokenizerFactory)
The
TokenizerFactory that should be used. |
CnnSentenceDataSetIterator.Builder |
unknownWordHandling(CnnSentenceDataSetIterator.UnknownWordHandling unknownWordHandling)
Specify how unknown words (those that don't have a word vector in the provided WordVectors instance) should be
handled.
|
CnnSentenceDataSetIterator.Builder |
useNormalizedWordVectors(boolean useNormalizedWordVectors)
Whether normalized word vectors should be used.
|
CnnSentenceDataSetIterator.Builder |
wordVectors(WordVectors wordVectors)
Provide the WordVectors instance that should be used for training
|
public CnnSentenceDataSetIterator.Builder sentenceProvider(LabeledSentenceProvider labeledSentenceProvider)
public CnnSentenceDataSetIterator.Builder sentenceProvider(LabelAwareIterator iterator, @NonNull java.util.List<java.lang.String> labels)
public CnnSentenceDataSetIterator.Builder sentenceProvider(LabelAwareDocumentIterator iterator, @NonNull java.util.List<java.lang.String> labels)
public CnnSentenceDataSetIterator.Builder sentenceProvider(LabelAwareSentenceIterator iterator, @NonNull java.util.List<java.lang.String> labels)
public CnnSentenceDataSetIterator.Builder wordVectors(WordVectors wordVectors)
public CnnSentenceDataSetIterator.Builder tokenizerFactory(TokenizerFactory tokenizerFactory)
TokenizerFactory
that should be used. Defaults to DefaultTokenizerFactory
public CnnSentenceDataSetIterator.Builder unknownWordHandling(CnnSentenceDataSetIterator.UnknownWordHandling unknownWordHandling)
public CnnSentenceDataSetIterator.Builder minibatchSize(int minibatchSize)
public CnnSentenceDataSetIterator.Builder useNormalizedWordVectors(boolean useNormalizedWordVectors)
public CnnSentenceDataSetIterator.Builder maxSentenceLength(int maxSentenceLength)
public CnnSentenceDataSetIterator.Builder sentencesAlongHeight(boolean sentencesAlongHeight)
public CnnSentenceDataSetIterator.Builder dataSetPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor dataSetPreProcessor)
public CnnSentenceDataSetIterator build()