public class CnnSentenceDataSetIterator extends Object implements org.nd4j.linalg.dataset.api.iterator.DataSetIterator
Modifier and Type | Class and Description |
---|---|
static class |
CnnSentenceDataSetIterator.Builder |
static class |
CnnSentenceDataSetIterator.Format
Format of features:
CNN1D: For use with 1d convolution layers: Shape [minibatch, vectorSize, sentenceLength] CNN2D: For use with 2d convolution layers: Shape [minibatch, 1, vectorSize, sentenceLength] or [minibatch, 1, sentenceLength, vectorSize], depending on the setting for 'sentencesAlongHeight' configuration. |
static class |
CnnSentenceDataSetIterator.UnknownWordHandling |
Modifier | Constructor and Description |
---|---|
protected |
CnnSentenceDataSetIterator(CnnSentenceDataSetIterator.Builder builder) |
Modifier and Type | Method and Description |
---|---|
boolean |
asyncSupported() |
int |
batch() |
Map<String,Integer> |
getLabelClassMap() |
List<String> |
getLabels() |
org.nd4j.linalg.dataset.api.DataSetPreProcessor |
getPreProcessor() |
boolean |
hasNext() |
int |
inputColumns() |
org.nd4j.linalg.api.ndarray.INDArray |
loadSingleSentence(String sentence)
Generally used post training time to load a single sentence for predictions
|
org.nd4j.linalg.dataset.DataSet |
next() |
org.nd4j.linalg.dataset.DataSet |
next(int num) |
void |
remove() |
void |
reset() |
boolean |
resetSupported() |
void |
setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor) |
int |
totalOutcomes() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected CnnSentenceDataSetIterator(CnnSentenceDataSetIterator.Builder builder)
public org.nd4j.linalg.api.ndarray.INDArray loadSingleSentence(String sentence)
public List<String> getLabels()
getLabels
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean hasNext()
hasNext
in interface Iterator<org.nd4j.linalg.dataset.DataSet>
public org.nd4j.linalg.dataset.DataSet next()
next
in interface Iterator<org.nd4j.linalg.dataset.DataSet>
public org.nd4j.linalg.dataset.DataSet next(int num)
next
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int inputColumns()
inputColumns
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int totalOutcomes()
totalOutcomes
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean resetSupported()
resetSupported
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public boolean asyncSupported()
asyncSupported
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public void reset()
reset
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public int batch()
batch
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public void setPreProcessor(org.nd4j.linalg.dataset.api.DataSetPreProcessor preProcessor)
setPreProcessor
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public org.nd4j.linalg.dataset.api.DataSetPreProcessor getPreProcessor()
getPreProcessor
in interface org.nd4j.linalg.dataset.api.iterator.DataSetIterator
public void remove()
remove
in interface Iterator<org.nd4j.linalg.dataset.DataSet>
Copyright © 2021. All rights reserved.