Class ImageMultiPreProcessingScaler
- java.lang.Object
-
- org.nd4j.linalg.dataset.api.preprocessor.ImageMultiPreProcessingScaler
-
- All Implemented Interfaces:
MultiDataSetPreProcessor
,MultiDataNormalization
,Normalizer<MultiDataSet>
public class ImageMultiPreProcessingScaler extends Object implements MultiDataNormalization
-
-
Constructor Summary
Constructors Constructor Description ImageMultiPreProcessingScaler(double a, double b, int[] featureIndices)
ImageMultiPreProcessingScaler(double a, double b, int maxBits, int[] featureIndices)
Preprocessor can take a range as minRange and maxRangeImageMultiPreProcessingScaler(int... featureIndices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fit(MultiDataSetIterator iterator)
Iterates over a dataset accumulating statistics for normalizationvoid
fit(MultiDataSet dataSet)
Fit a dataset (only compute based on the statistics from this dataset)NormalizerType
getType()
Get the enum opType of this normalizervoid
preProcess(MultiDataSet multiDataSet)
Preprocess the MultiDataSetvoid
revert(MultiDataSet toRevert)
Undo (revert) the normalization applied by this DataNormalization instance (arrays are modified in-place)void
revertFeatures(INDArray[] features)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoid
revertFeatures(INDArray[] features, INDArray[] featuresMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoid
revertLabels(INDArray[] labels)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.void
revertLabels(INDArray[] labels, INDArray[] labelsMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.void
transform(MultiDataSet toPreProcess)
Transform the dataset
-
-
-
Constructor Detail
-
ImageMultiPreProcessingScaler
public ImageMultiPreProcessingScaler(int... featureIndices)
-
ImageMultiPreProcessingScaler
public ImageMultiPreProcessingScaler(double a, double b, int[] featureIndices)
-
ImageMultiPreProcessingScaler
public ImageMultiPreProcessingScaler(double a, double b, int maxBits, int[] featureIndices)
Preprocessor can take a range as minRange and maxRange- Parameters:
a
- , default = 0b
- , default = 1maxBits
- in the image, default = 8featureIndices
- Indices of feature arrays to process. If only one feature array is present, this should always be 0
-
-
Method Detail
-
fit
public void fit(MultiDataSetIterator iterator)
Description copied from interface:MultiDataNormalization
Iterates over a dataset accumulating statistics for normalization- Specified by:
fit
in interfaceMultiDataNormalization
- Parameters:
iterator
- the iterator to use for collecting statistics.
-
preProcess
public void preProcess(MultiDataSet multiDataSet)
Description copied from interface:MultiDataSetPreProcessor
Preprocess the MultiDataSet- Specified by:
preProcess
in interfaceMultiDataNormalization
- Specified by:
preProcess
in interfaceMultiDataSetPreProcessor
-
revertFeatures
public void revertFeatures(INDArray[] features, INDArray[] featuresMask)
Description copied from interface:MultiDataNormalization
Undo (revert) the normalization applied by this DataNormalization instance to the specified features array- Specified by:
revertFeatures
in interfaceMultiDataNormalization
- Parameters:
features
- Features to revert the normalization on
-
revertFeatures
public void revertFeatures(INDArray[] features)
Description copied from interface:MultiDataNormalization
Undo (revert) the normalization applied by this DataNormalization instance to the specified features array- Specified by:
revertFeatures
in interfaceMultiDataNormalization
- Parameters:
features
- Features to revert the normalization on
-
revertLabels
public void revertLabels(INDArray[] labels, INDArray[] labelsMask)
Description copied from interface:MultiDataNormalization
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e.,#isFitLabel()
== false) then this is a no-op. Can also be used to undo normalization for network output arrays, in the case of regression.- Specified by:
revertLabels
in interfaceMultiDataNormalization
- Parameters:
labels
- Labels array to revert the normalization onlabelsMask
- Labels mask array (may be null)
-
revertLabels
public void revertLabels(INDArray[] labels)
Description copied from interface:MultiDataNormalization
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e.,#isFitLabel()
== false) then this is a no-op. Can also be used to undo normalization for network output arrays, in the case of regression.- Specified by:
revertLabels
in interfaceMultiDataNormalization
- Parameters:
labels
- Labels array to revert the normalization on
-
fit
public void fit(MultiDataSet dataSet)
Description copied from interface:Normalizer
Fit a dataset (only compute based on the statistics from this dataset)- Specified by:
fit
in interfaceNormalizer<MultiDataSet>
- Parameters:
dataSet
- the dataset to compute on
-
transform
public void transform(MultiDataSet toPreProcess)
Description copied from interface:Normalizer
Transform the dataset- Specified by:
transform
in interfaceNormalizer<MultiDataSet>
- Parameters:
toPreProcess
- the dataset to re process
-
revert
public void revert(MultiDataSet toRevert)
Description copied from interface:Normalizer
Undo (revert) the normalization applied by this DataNormalization instance (arrays are modified in-place)- Specified by:
revert
in interfaceNormalizer<MultiDataSet>
- Parameters:
toRevert
- DataSet to revert the normalization on
-
getType
public NormalizerType getType()
Description copied from interface:Normalizer
Get the enum opType of this normalizer- Specified by:
getType
in interfaceNormalizer<MultiDataSet>
- Returns:
- the opType
- See Also:
NormalizerSerializerStrategy.getSupportedType()
-
-