The core concept of machine learning is simple enough. We took a first look at it in section 1.3. Then in section 2.8.2 we studied classifiers as a special case. Let us revisit these with a different example this time. Also, in section 1.3 we skipped on the topic of error minimization. This time, armed with our knowledge of gradients, we will study the topic.
The python numpy/pytorch code for this section, in the form of fully functional and executable Jupyter-notebooks can be found at http://mng.bz/4Zya.
Suppose we want to create a classifier machine that classifies whether an image contain a car or a giraffe. Such classifiers, with only two classes, are known as binary classifiers. We identify a set of input signals which are collected together in an input vector denoted
. In case of convolutional neural networks, aka CNNs, the inputs are the pixel values of the image. The image is usually scaled to a fixed size, say 224 × 224. Thus the image is representable as a matrix
Each element of the matrix, Xi,j is a pixel color value in the range [0,255].