Java Code Examples for org.datavec.api.split.ListStringSplit#getData()

The following examples show how to use org.datavec.api.split.ListStringSplit#getData() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListStringRecordReader.java    From DataVec with Apache License 2.0 5 votes vote down vote up
/**
 * Called once at initialization.
 *
 * @param split the split that defines the range of records to read
 * @throws IOException
 * @throws InterruptedException
 */
@Override
public void initialize(InputSplit split) throws IOException, InterruptedException {
    if (split instanceof ListStringSplit) {
        ListStringSplit listStringSplit = (ListStringSplit) split;
        delimitedData = listStringSplit.getData();
        dataIter = delimitedData.iterator();
    } else {
        throw new IllegalArgumentException("Illegal type of input split " + split.getClass().getName());
    }
}
 
Example 2
Source File: ListStringRecordReader.java    From deeplearning4j with Apache License 2.0 5 votes vote down vote up
/**
 * Called once at initialization.
 *
 * @param split the split that defines the range of records to read
 * @throws IOException
 * @throws InterruptedException
 */
@Override
public void initialize(InputSplit split) throws IOException, InterruptedException {
    if (split instanceof ListStringSplit) {
        ListStringSplit listStringSplit = (ListStringSplit) split;
        delimitedData = listStringSplit.getData();
        dataIter = delimitedData.iterator();
    } else {
        throw new IllegalArgumentException("Illegal type of input split " + split.getClass().getName());
    }
}