Giter VIP home page Giter VIP logo

alexnet-pytorch's Introduction

Pytorch implementation of AlexNet

  • Now compatible with pytorch==0.4.0

This is an implementaiton of AlexNet, as introduced in the paper "ImageNet Classification with Deep Convolutional Neural Networks" by Alex Krizhevsky et al. (original paper)

This was the first very successful CNN for image classification that led to breakout of deep learning 'hype', as well as the first successful example of utilizing dropout layers.

Prerequisites

  • python >= 3.5
  • pytorch==0.4.0

You can install required packages by:

pip3 install -r requirements.txt

DataSet

This implemenation uses the ILSVRC 2012 dataset, also known as the 'ImageNet 2012 dataset'. The data size is dreadfully large (138G!), but this amount of large-sized dataset is required for successful training of AlexNet. Testing with Tiny ImageNet or MNIST could not be done due to their smaller feature sizes (images do not fit the input size 227 x 227).

After downloading the dataset file (i.e., ILSVRC2012_img_train.tar), use extract_imagenet.sh to extract the entire dataset.

extract_imagenet.sh

ImageNet 2012's dataset structure is already arranged as /root/[class]/[img_id].jpeg, so using torchvision.datasets.ImageFolder is convenient.

Training

python3 model.py

Specify the data path by modifying the constant TRAIN_IMG_DIR at the beginning of the script. Also tune model parameters by modifying constants at the beginning of the script.

alexnet-pytorch's People

Contributors

dansuh17 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.