Life long learning

Learning

Browse short learning notes by domain, track, and framework, or search for a specific concept or library.

Domain

AI

Machine Learning / Frameworks

TensorFlow is a machine learning framework used to build and train models.

At a very basic level, you can think of it as a toolkit for:

  • working with tensors, which are multi-dimensional arrays
  • building neural networks
  • training models on data
  • running predictions on new inputs

Common beginner ideas:

  • tf.Tensor: the basic data structure
  • keras.Sequential: a simple way to define a model layer by layer
  • model.fit(...): trains a model
  • model.predict(...): makes predictions

Very small mental model:

  1. Load data.
  2. Define a model.
  3. Train the model.
  4. Evaluate the result.
  5. Use the model for prediction.

Simple example:

import tensorflow as tf

model = tf.keras.Sequential([
    tf.keras.layers.Dense(8, activation="relu"),
    tf.keras.layers.Dense(1)
])

model.compile(optimizer="adam", loss="mse")

Why people use TensorFlow:

  • good ecosystem
  • strong support for deep learning
  • useful for production deployment
  • integrates well with Keras

Good first goal:

Build a tiny model that learns from a small table of numbers before moving into images, text, or time series.

scikit-learn is one of the easiest Python libraries for getting started with machine learning.

It is best known for classic machine learning rather than deep learning.

Typical use cases:

  • classification
  • regression
  • clustering
  • preprocessing
  • model evaluation

Common beginner ideas:

  • train_test_split(...): split data into training and test sets
  • fit(...): train a model
  • predict(...): generate predictions
  • score(...): quick accuracy or model score check

Simple example:

from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression

model = LogisticRegression()

Very small mental model:

  1. Prepare a table of features and labels.
  2. Split the data.
  3. Train a model with fit.
  4. Predict with predict.
  5. Evaluate how well it worked.

Why people use scikit-learn:

  • simple API
  • great for beginners
  • strong set of classical ML algorithms
  • useful utilities for preprocessing and evaluation

Good first goal:

Train a basic classification model on tabular data before moving on to more advanced model types.

PyTorch is a machine learning framework that is very popular for research and deep learning.

It is often liked because it feels close to normal Python code and is easy to experiment with.

At a basic level, PyTorch helps you:

  • create tensors
  • define neural network layers
  • calculate loss
  • update model weights during training

Common beginner ideas:

  • torch.tensor(...): creates data
  • nn.Module: base class for models
  • forward(...): defines how data moves through the model
  • optim.Adam(...): updates model parameters

Simple example:

import torch
import torch.nn as nn

model = nn.Sequential(
    nn.Linear(4, 8),
    nn.ReLU(),
    nn.Linear(8, 1)
)

Very small mental model:

  1. Prepare tensors for inputs and outputs.
  2. Define a model.
  3. Run data through the model.
  4. Measure error with a loss function.
  5. Update the model using an optimizer.

Why people use PyTorch:

  • clean developer experience
  • strong deep learning support
  • popular in AI research
  • flexible for custom model design

Good first goal:

Train a tiny regression or classification model so you understand tensors, layers, loss, and optimization.

Hugging Face is a popular ecosystem for working with modern AI models, especially natural language processing.

It gives you access to:

  • pre-trained models
  • tokenizers
  • datasets
  • model hubs
  • developer tooling for inference and fine-tuning

For beginners, the most useful idea is that you do not always need to train a model from scratch.

Common beginner ideas:

  • transformers: library for using models
  • pipeline(...): easiest way to try a task
  • model hub: a catalogue of shared models
  • tokenizers: convert text into model-friendly input

Simple example:

from transformers import pipeline

classifier = pipeline("sentiment-analysis")
result = classifier("This is a great place to start learning AI.")

Very small mental model:

  1. Pick a task such as sentiment analysis or text generation.
  2. Load a pre-trained model.
  3. Pass input into the model.
  4. Read the output.
  5. Later, fine-tune if needed.

Why people use Hugging Face:

  • quick access to powerful pre-trained models
  • easy experimentation
  • strong NLP ecosystem
  • useful for both learning and production prototypes

Good first goal:

Run a small text example through a ready-made pipeline so you understand the value of pre-trained models.

Select topics to continue.

Made with ❀️ by Abrar Mudhir © 2026 > LinkedIn    Website       BuyMeACoffee    GitHub