public abstract class BaseDataFetcher extends java.lang.Object implements DataSetFetcher
Modifier and Type | Field and Description |
---|---|
protected org.nd4j.linalg.dataset.DataSet |
curr |
protected int |
cursor |
protected int |
inputColumns |
protected static org.slf4j.Logger |
log |
protected int |
numOutcomes |
protected int |
totalExamples |
Constructor and Description |
---|
BaseDataFetcher() |
Modifier and Type | Method and Description |
---|---|
protected org.nd4j.linalg.api.ndarray.INDArray |
createInputMatrix(int numRows)
Creates a feature vector
|
protected org.nd4j.linalg.api.ndarray.INDArray |
createOutputMatrix(int numRows) |
protected org.nd4j.linalg.api.ndarray.INDArray |
createOutputVector(int outcomeLabel)
Creates an output label matrix
|
int |
cursor()
Direct access to a number represenative of iterating through a dataset
|
java.lang.String |
getLabelName(int i) |
boolean |
hasMore()
Whether the dataset has more to load
|
protected void |
initializeCurrFromList(java.util.List<org.nd4j.linalg.dataset.DataSet> examples)
Initializes this data transform fetcher from the passed in datasets
|
int |
inputColumns()
The length of a feature vector for an individual example
|
org.nd4j.linalg.dataset.DataSet |
next()
Returns the next data applyTransformToDestination
|
void |
reset()
Returns the fetcher back to the beginning of the dataset
|
void |
setLabelNames(java.util.List<java.lang.String> names)
Sets a list of label names to the curr dataset
|
int |
totalExamples()
The total number of examples
|
int |
totalOutcomes()
The number of labels for a dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fetch
protected int cursor
protected int numOutcomes
protected int inputColumns
protected org.nd4j.linalg.dataset.DataSet curr
protected int totalExamples
protected static final org.slf4j.Logger log
protected org.nd4j.linalg.api.ndarray.INDArray createInputMatrix(int numRows)
numRows
- the number of examplesprotected org.nd4j.linalg.api.ndarray.INDArray createOutputVector(int outcomeLabel)
outcomeLabel
- the outcome label to useprotected org.nd4j.linalg.api.ndarray.INDArray createOutputMatrix(int numRows)
protected void initializeCurrFromList(java.util.List<org.nd4j.linalg.dataset.DataSet> examples)
examples
- the examples to usepublic void setLabelNames(java.util.List<java.lang.String> names)
public java.lang.String getLabelName(int i)
public boolean hasMore()
DataSetFetcher
hasMore
in interface DataSetFetcher
public org.nd4j.linalg.dataset.DataSet next()
DataSetFetcher
next
in interface DataSetFetcher
public int totalOutcomes()
DataSetFetcher
totalOutcomes
in interface DataSetFetcher
public int inputColumns()
DataSetFetcher
inputColumns
in interface DataSetFetcher
public int totalExamples()
DataSetFetcher
totalExamples
in interface DataSetFetcher
public void reset()
DataSetFetcher
reset
in interface DataSetFetcher
public int cursor()
DataSetFetcher
cursor
in interface DataSetFetcher