public abstract class BaseDataFetcher extends Object implements DataSetFetcher
Modifier and Type | Field and Description |
---|---|
protected 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 INDArray |
createInputMatrix(int numRows)
Creates a feature vector
|
protected INDArray |
createOutputMatrix(int numRows) |
protected INDArray |
createOutputVector(int outcomeLabel)
Creates an output label matrix
|
int |
cursor()
Direct access to a number represenative of iterating through a dataset
|
boolean |
hasMore()
Whether the dataset has more to load
|
protected void |
initializeCurrFromList(List<DataSet> examples)
Initializes this data transform fetcher from the passed in datasets
|
int |
inputColumns()
The length of a feature vector for an individual example
|
DataSet |
next()
Returns the next data applyTransformToDestination
|
void |
reset()
Returns the fetcher back to the beginning of the 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 static final org.slf4j.Logger log
protected int cursor
protected int numOutcomes
protected int inputColumns
protected DataSet curr
protected int totalExamples
protected INDArray createInputMatrix(int numRows)
numRows
- the number of examplesprotected INDArray createOutputVector(int outcomeLabel)
outcomeLabel
- the outcome label to useprotected INDArray createOutputMatrix(int numRows)
protected void initializeCurrFromList(List<DataSet> examples)
examples
- the examples to usepublic boolean hasMore()
DataSetFetcher
hasMore
in interface DataSetFetcher
public 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
Copyright © 2016. All Rights Reserved.