Created
July 8, 2015 22:07
-
-
Save kryton/2d8d8b3ffe27052f6d28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DL { | |
private static Logger log = LoggerFactory.getLogger(DL.class); | |
public static void main(String[] args) throws Exception { | |
int batchSize = 10; | |
File file = new File("/Users/iholsman/dl/data/out/deeplearning.1.csv"); | |
//File file = new File("/Users/iholsman/dl/src/Canova/canova-api/src/test/resources/iris.libsvm"); | |
FileSplit fileSplit = new FileSplit(file); | |
Configuration conf = new Configuration(); | |
conf.set(FileRecordReader.APPEND_LABEL, "true"); | |
RecordReader libSvmRecordReader = new LibSvmRecordReader(); | |
libSvmRecordReader.initialize(conf, fileSplit); | |
DataSetIterator iter = new RecordReaderDataSetIterator(libSvmRecordReader, batchSize); | |
while (iter.hasNext()) { | |
DataSet d = iter.next(); | |
log.info("Col Names - {}", d.getColumnNames()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment