Giter Site home page Giter Site logo

pytorch_imagenet's Introduction

The implementation of AlexNet in PyTorch Vision is not actually the ordinary version. In this case, this repository reimplements some of the networks for the author's usage.

Pre-requirements

Data Preparation

The original data loader (link) is slow. Therefore, I build a new data loader with Caffe utils.

Genearte LMDB

The preprocessed datasets can be found here. Please download it and uncompress it into the directory of ./networks/data/.
To generate the dataset from raw images, please follow the instructions for Caffe to build the LMDB dataset of ImageNet. However, the key used in the LMDB dataset is not suitable for accessing. Therefore, please use the script ./tools/fix_key.sh to convert the keys. Preprocessed data will be available soon.

Load LMDB

Please change the variable lmdb_dir in ./datasets/folder.py to the directory which includes the training and validating LMDB datasets.

AlexNet

The implementation is in ./networks/model_list/alexnet.py. Since PyTorch does not support local response normalization (LRN) layer, I implements it also. The trained model will be available soon.

Training from scratch

$ cd networks
$ python main.py --arch alexnet

Evaluate pretained model

Pretrained model is available here. The pretained model achieves an accuracy of 57.494% (Top-1) and 80.588% (Top-5). Please download it and put it under the directory of ./networks/model_list/. Run the evaluation by:

$ python main.py --arch alexnet --pretrained --evaluate

pytorch_imagenet's People

Contributors

jiecaoyu avatar

Watchers

Shubham Pachori 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.