Created
November 11, 2016 19:23
-
-
Save tomthetrainer/38b9f22dc067f66654dee9200207162c 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
// How do I apply the same functionality that I have here in this code snippet of a DataSetIterator | |
DataNormalization scaler = new ImagePreProcessingScaler(0,1); | |
scaler.fit(dataIter); | |
dataIter.setPreProcessor(scaler); | |
// this was run when I trained the data | |
// took pixels from 0-255 to 0-1 | |
// Now I read the data like this (Thanks Raver.) | |
File mf = new File(filechose); | |
NativeImageLoader loader = new NativeImageLoader(height, width, channels); | |
INDArray image = loader.asMatrix(mf); | |
// The INDArray image however has values 0-255 | |
// How do I apply the scaler from the first example, to the INDArray from the second | |
// More general question , what is the difference between a DataSet and an INDArray |
The dataset has features,labels and masks associated with it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
scaler.transform(image) will work. Give that a try