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.
The original data loader (link) is slow. Therefore, I build a new data loader with Caffe utils.
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.
Please change the variable lmdb_dir
in ./datasets/folder.py
to the directory which includes the training and validating LMDB datasets.
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.
$ cd networks
$ python main.py --arch alexnet
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