Image To NDArray Step
As pre-processing step
Image To NDArray Step is used as a pre-processing step in Pipeline Step to manipulate or convert the image into an n-D array based on the model requirement input layer or the next pipeline step. We can include ImageToNDArrayStep()
in pipeline into inference configuration.
From ImageToNDArrayConfig()
in the above, the input image will have 28 by 28 shape size and convert to a 3-D array. Set mini batch dimension to true, and the channel has a depth of 1 for grayscale, put at last of a list such [1, 28, 28, 1].
The shape array such [minibatch_dim, width, height, channels] if format is CHANNELS_LAST .
We'll be able to add data normalization and change channel element position to first which will give the input of [1, 1, 28, 28] to the model. Failure to give an image with characteristics mentioned in configuration will affect the deployment of model in server and return an error. You can see the similar configuration in Keras Step and Tensorflow Step.
Last updated