The result you want to get from the input through your layers is either 1 or 0. So when you give the picture of the cat next door to your neural network, you have to get 1 (this is a cat) or 0 (not a cat).
To do this, you need to look at your picture’s RGB (Red – Green – Blue) values and vectorize it with a matrix of 1 column and n lines. If we assume that this image is a 64X64 image, the line number of the matrix you will get is n like this.
This will give you a Y output by entering X as your input to your input layers.
We have to test the samples. That’s why we need an array of Mtest data. Mtest data is tagged data. So it is clear whether the test data is a cat picture.
“Shape” gives the number of objects in the rows and columns in the array, and gives the output (a, b). The first is a line and the second is b, and b is the milk.