Wednesday, October 4, 2023

Pytorch 10, 11

 Starting a new project with pytorch, today. Will be using the mnist

database of handwritten digits to build a recognition model. The

database, below, from the German-language Wikipedia.

                                                           


It's actually amusing: the original 60,000 digits were from Department of Census

employees and the 10,000 test ones from High School students of the 1990s.

Each image is 28x28 pixels, grayscale image on 255 with 0 as white and 1 as

black.


 As explained in the Codemy tutorial, the first thing that happens to images is that

they are translated to background 0 images, with gray borders and a black central

nerve. One is then free to proceed with an analysis of the borders...


                                                       

       

                                                                          *     *     *

Pytorch 11:

A convolution - in Machine Learning - is going through an image, pixel by pixel,

and applying the desired Image Filter. One moves from left to right, one pixel advance at a time,

and then to the next row.

One can go to the Setosa site, below, to see how this works. I used the identity matrix

because it is easiest to see the math at work, but the Sobel ones are used to identify the

outlines of what is on the image.

                                                                                 







No comments: