https://github.com/raphaelsenn/alexnet
PyTroch implementation of AlexNet described in the revolutionary paper "ImageNet Classification with Deep Convolutional Neural Networks" from Hinton, Krizhevsky and Sutskever.
https://github.com/raphaelsenn/alexnet
Last synced: 8 months ago
JSON representation
PyTroch implementation of AlexNet described in the revolutionary paper "ImageNet Classification with Deep Convolutional Neural Networks" from Hinton, Krizhevsky and Sutskever.
- Host: GitHub
- URL: https://github.com/raphaelsenn/alexnet
- Owner: raphaelsenn
- License: mit
- Created: 2025-08-16T16:39:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-24T10:32:49.000Z (9 months ago)
- Last Synced: 2025-08-24T16:40:26.653Z (9 months ago)
- Language: Python
- Size: 121 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AlexNet
PyTroch implementation of AlexNet described in the revolutionary paper [ImageNet Classification with Deep Convolutional
Neural Networks](https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf) from Hinton, Krizhevsky and Sutskever.

*Taken from "ImageNet Classification with Deep Convolutional
Neural Networks", Krizhevsky et al., 2012*
## Usage
#### Creating AlexNet
```python
import torch
from alexnet import AlexNet
# Creating AlexNet
alxnet = AlexNet(num_classes=1000)
# Random input of shape [128, 3, 227, 227]
x = torch.rand((128, 3, 227, 227))
# Output will have shape [128, 1000]
out = alxnet(x)
```
#### Loading AlexNet (trained)
I have trained AlexNet on a subset of ImageNet1k on my poor RTX2060 6GB, the parameters can be downloaded `here`.
```python
import torch
from alexnet import AlexNet
# Creating AlexNet
alxnet = AlexNet(num_classes=1000)
# Loading the parameters
alxnet.load_state_dict(torch.load('./alexnet_state_dict.pth', weights_only=True))
# Have fun with inference
output = alxnet(...)
```
## Experiments
## Citations
```bibtex
@inproceedings{krizhevsky2012imagenet,
title = {Imagenet Classification with Deep Convolutional Neural Networks},
author = {Krizhevsky, Alex and Sutskever, Ilya and Hinton, Geoffrey E.},
booktitle = {Advances in Neural Information Processing Systems},
year = {2012},
pages = {1097--1105},
}
```
```bibtex
@inproceedings{Deng2009Imagenet,
author = {Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li},
title = {ImageNet: A large-scale hierarchical image database},
booktitle = {2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2009},
pages = {248--255},
doi = {10.1109/CVPR.2009.5206848},
}
```