Normalizing

class Normalizing : Preprocessor

This preprocessor defines normalizing operation. Given mean and std for n channels, this operation normalizes each channel of the input array, i.e.

output[channel] = (input[channel] - mean[channel]) / std[channel].

Constructors

Normalizing
Link copied to clipboard
fun Normalizing()

Functions

apply
Link copied to clipboard
open override fun apply(data: FloatArray, inputShape: ImageShape): FloatArray

Transforms data with inputShape to the new data with the same shape.

Properties

mean
Link copied to clipboard
lateinit var mean: FloatArray

an array of mean values for each channel.

std
Link copied to clipboard
lateinit var std: FloatArray

an array of std values for each channel.