Created
February 26, 2017 20:28
-
-
Save mindcrime/1f16788a8330b746fbf187d332f932bf to your computer and use it in GitHub Desktop.
manual invocation of the preprocessor
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
JavaRDD<DataSet> unscaledData = rdd.map(new DataVecDataSetFunction(1,10, false, null, null )); | |
JavaRDD<DataSet> trainingData = unscaledData.map( new Function<DataSet,DataSet>() { | |
DataNormalization scaler = new ImagePreProcessingScaler(0,1); | |
@Override | |
public DataSet call(DataSet v1) throws Exception { | |
DataSet newDS = new DataSet( v1.getFeatures(), v1.getLabels()); | |
scaler.preProcess(newDS); | |
return newDS; | |
}} ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment