Skip to content

Instantly share code, notes, and snippets.

@tastyminerals
Created January 29, 2018 14:06
Show Gist options
  • Save tastyminerals/6fb19d64c5a48dca967c6c6e6440bb58 to your computer and use it in GitHub Desktop.
Save tastyminerals/6fb19d64c5a48dca967c6c6e6440bb58 to your computer and use it in GitHub Desktop.
MultiDataSetIterator
MultiDataSetIterator iterator = new RecordReaderMultiDataSetIterator.Builder(batchSize)
.addReader("csvInput", featuresReader)
.addReader("csvLabels", labelsReader)
.addInput("csvInput") //Input: all columns from input reader
.addOutput("csvLabels", 0, 3) //Output 1: columns 0 to 3 inclusive
.addOutputOneHot("csvLabels", 4, numClasses) //Output 2: column 4 -> convert to one-hot for classification
.build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment