Welcome back.
Now let's get the input shape from the model inside this try and catch block.
Here we need to get the input shape from the model.
Start with val input shape equals to the interpreter dot.
Get input shape and input tensor.
The input tensor here.
Dot shape used for reading the input dimensions, width and height and that the TensorFlow Lite model
expects.
So here we need to make a comment.
I love comments and input shape dimensions of input tensor.
This retrieves information about the first input tensor at index zero.
So here index zero.
The shape function returns an array of integers that represents the input tensors dimension.
So if we hover the mouse, we get the shape returns an integer array.
For example, many images and the input shapes would be like this.
For example One, 2 to 4, 2 to 4 and three.
What does this input shape means?
Number one.
The batch size one.
Image at time 24224.
The image width and height and the three is the number of color channels RGB channels.
Okay, so three returns the RGB channels.
Number of color channels.
Okay.
So for example here I want from you to understand the input shape.
It's an array that returns the data in form of 1D array.
This 1D array contains numbers.
Those numbers represent.
The first one is the batch size one image at time 244 is the image width 2424.
The way the image height and the three is the number of color channels of RGB channels.
Okay, so batch size, image width, image height and the channel if either if it is an RGB or others.