Learning AI as a Programmer - Week 2

Learning AI as a Programmer - Week 2

Tensors are important, like really important. That is basically what I have learned from my last week of diving into Machine Learning. Last week I was talking about learning linear regressions, which I feel pretty confident in at this point. This week has been nothing but tensors. For reference:

  • Tensor: A data structure that contains lists of numbers that map to certain concepts in the model

This definition may be fuzzy and hard to understand, so I will try to clarify. When you take inputs that you want to feed into a machine learning model, for the model to work with those inputs, they must be numbers. So let's say that we want a classifier model to tell us if an image of an animal is a cat or dog. That image would need to be converted to a series of numbers (a tensor) so that the mathematical model could operate on that input. After the model has modified this tensor in whatever way it has been trained to, it will output another tensor (data structure of numbers), from which we can derive a result.

This is also where brushing up on your math skills would come in handy. The most common operation done on tensors seems to be matrix multiplication. If you are not familiar with how that works here is a cool website that shows you how it works with animated examples.

Matrix Multiplication Visualized

So now I understand at a high level how machine learning models work. They take in inputs and convert them to a tensor that can be worked with. Feed that tensor through a model which uses math that has been trained to transform the input tensor. This model is trained by changing the weights and biases used in the formulas to better match the expected outputs. After the input tensor is modified by the model it is now the output tensor from which results can be derived.

Besides just tensors, I have found new resources to learn machine learning from, such as Kaggle. A website that not only has courses on machine learning but has tons of data sets to work with so that you could create your own machine learning models and train them. For now, I am sticking with my Coursera specialization and long PyTorch video, but maybe I will look into Kaggle this next week.

I feel like I learned more in week one, but maybe that was because of all of the vocabulary. My goal for this next week is to maybe learn more about the various subfields of machine learning and maybe make a classifier using PyTorch.