public class RnnTextEmbeddingDataSetIterator
extends java.lang.Object
implements org.nd4j.linalg.dataset.api.iterator.DataSetIterator, java.io.Serializable
| Constructor and Description |
|---|
RnnTextEmbeddingDataSetIterator(weka.core.Instances data,
org.deeplearning4j.models.embeddings.wordvectors.WordVectors wordVectors,
TokenizerFactory tokenFact,
TokenPreProcess tpp,
weka.core.stopwords.AbstractStopwords stopWords,
org.deeplearning4j.iterator.LabeledSentenceProvider sentenceProvider,
int batchSize,
int truncateLength)
Constructor with necessary objects to create RNN features.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
asyncSupported() |
int |
batch() |
java.util.List<java.lang.String> |
getLabels() |
org.nd4j.linalg.dataset.api.DataSetPreProcessor |
getPreProcessor() |
boolean |
hasNext() |
int |
inputColumns() |
org.nd4j.linalg.dataset.DataSet |
next() |
org.nd4j.linalg.dataset.DataSet |
next(int num) |
int |
numExamples() |
void |
remove() |
void |
reset() |
boolean |
resetSupported() |
void |
setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor) |
int |
totalOutcomes() |
public RnnTextEmbeddingDataSetIterator(weka.core.Instances data,
org.deeplearning4j.models.embeddings.wordvectors.WordVectors wordVectors,
TokenizerFactory tokenFact,
TokenPreProcess tpp,
weka.core.stopwords.AbstractStopwords stopWords,
org.deeplearning4j.iterator.LabeledSentenceProvider sentenceProvider,
int batchSize,
int truncateLength)
data - Instances with documents and labelswordVectors - WordVectors objecttokenFact - Tokenizer factorytpp - Token pre processorstopWords - Stop word objectbatchSize - Size of each minibatch for trainingtruncateLength - If reviews exceedpublic org.nd4j.linalg.dataset.DataSet next(int num)
next in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic int inputColumns()
inputColumns in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic int totalOutcomes()
totalOutcomes in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic void reset()
reset in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic boolean resetSupported()
resetSupported in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic boolean asyncSupported()
asyncSupported in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic int batch()
batch in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic int numExamples()
public java.util.List<java.lang.String> getLabels()
getLabels in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic boolean hasNext()
hasNext in interface java.util.Iterator<org.nd4j.linalg.dataset.DataSet>public org.nd4j.linalg.dataset.DataSet next()
next in interface java.util.Iterator<org.nd4j.linalg.dataset.DataSet>public void remove()
remove in interface java.util.Iterator<org.nd4j.linalg.dataset.DataSet>public org.nd4j.linalg.dataset.api.DataSetPreProcessor getPreProcessor()
getPreProcessor in interface org.nd4j.linalg.dataset.api.iterator.DataSetIteratorpublic void setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor)
setPreProcessor in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator