22 KiB
Machine Learning Collection
In this repository you will find tutorials and projects related to Machine Learning. I try to make the code as clear as possible, and the goal is be to used as a learning resource and a way to lookup problems to solve specific problems. For most I have also done video explanations on YouTube if you want a walkthrough for the code. If you got any questions or suggestions for future videos I prefer if you ask it on YouTube. This repository is contribution friendly, so if you feel you want to add something then I'd happily merge a PR 😃
Table Of Contents
Machine Learning
Linear Regression - With Gradient Descent ✅
Linear Regression - With Normal Equation ✅
Logistic Regression
Naive Bayes - Gaussian Naive Bayes
K-nearest neighbors
K-means clustering
Support Vector Machine - Using CVXOPT
Neural Network
PyTorch Tutorials
If you have any specific video suggestion please make a comment on YouTube :)
Basics
Tensor Basics
Feedforward Neural Network
Convolutional Neural Network
Recurrent Neural Network
Bidirectional Recurrent Neural Network
Loading and saving model
Custom Dataset (Images)
Custom Dataset (Text)
Mixed Precision Training
Imbalanced dataset
Transfer Learning and finetuning
Data augmentation using Torchvision
Data augmentation using Albumentations
TensorBoard Example
Calculate Mean and STD of Images
Simple Progress bar
Deterministic Behavior
Learning Rate Scheduler
Initialization of weights
More Advanced
Text Generating LSTM
Semantic Segmentation w. U-NET
Image Captioning
Neural Style Transfer
Torchtext [1] Torchtext [2] Torchtext [3]
Seq2Seq - Sequence to Sequence (LSTM)
Seq2Seq + Attention - Sequence to Sequence with Attention (LSTM)
Seq2Seq Transformers - Sequence to Sequence with Transformers
Transformers from scratch - Attention Is All You Need
Object Detection
Intersection over Union
Non-Max Suppression
Mean Average Precision
YOLOv1 from scratch
YOLOv3 from scratch
Generative Adversarial Networks
Architectures
LeNet5 - CNN architecture
VGG - CNN architecture
Inception v1 - CNN architecture
ResNet - CNN architecture
EfficientNet - CNN architecture
PyTorch Lightning
Tutorial 1 - Introduction and starter code
Tutorial 2 - LightningModule
Tutorial 3 - Trainer
Tutorial 4 - Metrics
Tutorial 5 - DataModule
Tutorial 6 - Code restructure
Tutorial 7 - Callbacks
Tutorial 8 - TensorBoard logging
Tutorial 9 - Profiler
Tutorial 10 - Multi-GPU
TensorFlow Tutorials
If you have any specific video suggestion please make a comment on YouTube :)
Beginner Tutorials
Tutorial 1 - Installation, Video Only
Tutorial 2 - Tensor Basics
Tutorial 3 - Neural Network
Tutorial 4 - Convolutional Neural Network
Tutorial 5 - Regularization
Tutorial 6 - RNN, GRU, LSTM
Tutorial 7 - Functional API
Tutorial 8 - Keras Subclassing
Tutorial 9 - Custom Layers
Tutorial 10 - Saving and Loading Models
Tutorial 11 - Transfer Learning
Tutorial 12 - TensorFlow Datasets
Tutorial 13 - Data Augmentation
Tutorial 14 - Callbacks
Tutorial 15 - Custom model.fit
Tutorial 16 - Custom Loops
Tutorial 17 - TensorBoard
Tutorial 18 - Custom Dataset Images
Tutorial 19 - Custom Dataset Text
Tutorial 20 - Classifying Skin Cancer - Beginner Project Example
Docker Setup
Step 1: Install Docker
If you don't have Docker installed, follow the links below to install Docker for your system:
Step 2: Install Nvidia Container Toolkit (Optional)
If you plan to use GPU acceleration with CUDA, install Nvidia Container Toolkit:
Step 3: Build the Docker Image
Navigate to the directory containing the Dockerfile and build the Docker image with:
docker build -t aladdin-image .
Step 4: Run the Docker Container in Detached Mode
Run the following command to start the container in detached mode:
docker run -d \
--gpus all \
-v "${PWD}:/code" \
-p 8080:8080 \
--name "aladdin-container" \
--env AUTHENTICATE_VIA_JUPYTER="mytoken" \
aladdin-image \
tail -f /dev/null
This will start a new Docker container named aladdin-container that will not exit immediately. The -d flag runs the container in detached mode, letting it run in the background.
Step 5: Interact with the Docker Container
To attach an interactive shell to the running container, use the command:
docker exec -it aladdin-container /bin/bash
You can now interact with your container using the bash shell.
Additional Notes
- If you wish to stop the container, you can do so with
docker stop aladdin-container. - To start the container again after stopping, use
docker start aladdin-container. - In case you need to remove the container, make sure it's stopped and then run
docker rm aladdin-container. - To see the output from the container (logs), use
docker logs aladdin-container.