preprocessInput

abstract fun preprocessInput(data: FloatArray, tensorShape: LongArray): FloatArray

Common preprocessing function for the Neural Networks trained on ImageNet and whose weights are available with the keras.application.

It takes data as input with shape tensorShape and applied the specific preprocessing according chosen modelType.

Parameters

tensorShape

Should be 3 dimensional array (HWC or CHW format)

open fun preprocessInput(preprocessing: Preprocessing): FloatArray

Common preprocessing function for the Neural Networks trained on ImageNet and whose weights are available with the keras.application.

It takes preprocessing pipeline, invoke it and applied the specific preprocessing to the given data.