WEBVTT

00:00.080 --> 00:00.920
Welcome back.

00:01.320 --> 00:08.200
Now let's get the input shape from the model inside this try and catch block.

00:08.200 --> 00:12.320
Here we need to get the input shape from the model.

00:12.320 --> 00:18.360
Start with val input shape equals to the interpreter dot.

00:18.400 --> 00:21.880
Get input shape and input tensor.

00:22.200 --> 00:24.120
The input tensor here.

00:24.320 --> 00:34.360
Dot shape used for reading the input dimensions, width and height and that the TensorFlow Lite model

00:34.360 --> 00:35.320
expects.

00:35.320 --> 00:38.480
So here we need to make a comment.

00:38.480 --> 00:44.320
I love comments and input shape dimensions of input tensor.

00:44.480 --> 00:51.160
This retrieves information about the first input tensor at index zero.

00:51.160 --> 00:53.560
So here index zero.

00:53.680 --> 01:02.680
The shape function returns an array of integers that represents the input tensors dimension.

01:02.960 --> 01:09.240
So if we hover the mouse, we get the shape returns an integer array.

01:09.280 --> 01:16.960
For example, many images and the input shapes would be like this.

01:16.960 --> 01:22.930
For example One, 2 to 4, 2 to 4 and three.

01:22.970 --> 01:26.010
What does this input shape means?

01:26.050 --> 01:26.970
Number one.

01:27.290 --> 01:29.730
The batch size one.

01:29.730 --> 01:33.410
Image at time 24224.

01:33.690 --> 01:42.610
The image width and height and the three is the number of color channels RGB channels.

01:42.650 --> 01:46.690
Okay, so three returns the RGB channels.

01:46.730 --> 01:49.810
Number of color channels.

01:49.850 --> 01:50.410
Okay.

01:50.610 --> 01:55.730
So for example here I want from you to understand the input shape.

01:55.730 --> 02:01.410
It's an array that returns the data in form of 1D array.

02:01.610 --> 02:04.130
This 1D array contains numbers.

02:04.130 --> 02:05.890
Those numbers represent.

02:05.890 --> 02:13.730
The first one is the batch size one image at time 244 is the image width 2424.

02:13.970 --> 02:22.490
The way the image height and the three is the number of color channels of RGB channels.

02:22.530 --> 02:32.410
Okay, so batch size, image width, image height and the channel if either if it is an RGB or others.
