/ml_intro

This repo serves as an introduction into some modern ML paradigms and the PyTorch framework.

Primary LanguagePythonMIT LicenseMIT

ml_intro

GitHub release License: MIT

This repo serves as an introduction into some modern ML paradigms and the PyTorch framework.

Example Network Architecture

AlexNet

Image from paper

Example Network Architecture

Link to paper.

Architecture of AlexNet.

The input image is 224x224x3. The output is 1000 classes.

  • Convolutional layer with 96 filters of size 11x11x3 with stride 4 and ReLU activation.
  • Max pooling layer with size 3x3 and stride 2.
  • Convolutional layer with 256 filters of size 5x5x48 with stride 1 and ReLU activation.
  • Max pooling layer with size 3x3 and stride 2.
  • Convolutional layer with 384 filters of size 3x3x256 with stride 1 and ReLU activation.
  • Convolutional layer with 384 filters of size 3x3x192 with stride 1 and ReLU activation.
  • Convolutional layer with 256 filters of size 3x3x192 with stride 1 and ReLU activation.
  • Max pooling layer with size 3x3 and stride 2.
  • Fully connected layer with 4096 neurons and ReLU activation.
  • Fully connected layer with 4096 neurons and ReLU activation.
  • Fully connected layer with 1000 neurons and Softmax activation.

Installation

Method 1: Use a virtual environment to install the required packages.

python3 -m venv venv
source venv/bin/activate

To install the required packages, run the following command:

pip3 install -r requirements.txt

Method 2: Use Docker to run the code.

docker build -t ml_intro .
docker run -it ml_intro

Usage

To run the code, run the following command:

python3 main.py <config_file>

Example:

python3 main.py config/default.json

License

MIT

Acknowledgements