Class ImagePreProcessingScaler

    • Constructor Detail

      • ImagePreProcessingScaler

        public ImagePreProcessingScaler()
      • ImagePreProcessingScaler

        public ImagePreProcessingScaler​(double a,
                                        double b)
      • ImagePreProcessingScaler

        public ImagePreProcessingScaler​(double a,
                                        double b,
                                        int maxBits)
        Preprocessor can take a range as minRange and maxRange
        Parameters:
        a - , default = 0
        b - , default = 1
        maxBits - in the image, default = 8
    • Method Detail

      • fit

        public void fit​(DataSet dataSet)
        Fit a dataset (only compute based on the statistics from this dataset0
        Specified by:
        fit in interface Normalizer<DataSet>
        Parameters:
        dataSet - the dataset to compute on
      • fit

        public void fit​(DataSetIterator iterator)
        Iterates over a dataset accumulating statistics for normalization
        Specified by:
        fit in interface DataNormalization
        Parameters:
        iterator - the iterator to use for collecting statistics.
      • preProcess

        public void preProcess​(INDArray features)
      • transform

        public void transform​(DataSet toPreProcess)
        Transform the data
        Specified by:
        transform in interface Normalizer<DataSet>
        Parameters:
        toPreProcess - the dataset to transform
      • transform

        public void transform​(INDArray features,
                              INDArray featuresMask)
        Description copied from interface: DataNormalization
        Transform the features, with an optional mask array
        Specified by:
        transform in interface DataNormalization
        Parameters:
        features - the features to pre process
        featuresMask - the mask array to pre process
      • revert

        public void revert​(DataSet toRevert)
        Description copied from interface: Normalizer
        Undo (revert) the normalization applied by this DataNormalization instance (arrays are modified in-place)
        Specified by:
        revert in interface Normalizer<DataSet>
        Parameters:
        toRevert - DataSet to revert the normalization on
      • revertFeatures

        public void revertFeatures​(INDArray features)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified features array
        Specified by:
        revertFeatures in interface DataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertFeatures

        public void revertFeatures​(INDArray features,
                                   INDArray featuresMask)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified features array
        Specified by:
        revertFeatures in interface DataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertLabels

        public void revertLabels​(INDArray labels)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e., #isFitLabels() == 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 interface DataNormalization
        Parameters:
        labels - Labels array to revert the normalization on
      • revertLabels

        public void revertLabels​(INDArray labels,
                                 INDArray labelsMask)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e., #isFitLabels() == 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 interface DataNormalization
        Parameters:
        labels - Labels array to revert the normalization on
        labelsMask - Labels mask array (may be null)
      • fitLabel

        public void fitLabel​(boolean fitLabels)
        Description copied from interface: DataNormalization
        Flag to specify if the labels/outputs in the dataset should be also normalized. Default value is usually false.
        Specified by:
        fitLabel in interface DataNormalization
      • isFitLabel

        public boolean isFitLabel()
        Description copied from interface: DataNormalization
        Whether normalization for the labels is also enabled. Most commonly used for regression, not classification.
        Specified by:
        isFitLabel in interface DataNormalization
        Returns:
        True if labels will be