Skip to content

stupidcucumber/AlexNet

Repository files navigation

AlexNet

Paper: ImageNet Classification with Deep Convolutional Neural Networks
Dataset: ImageNet Kaggle Dataset
Architecture: The architecture differ from what have been written to the paper above. The graph of the model is:

Architecture is fully compatible with TPU and can be compiled to EdgeTPU format.

Before training run:

pip install -r requirements.txt

When training, model will log everything to "logs/fit" folder. Anytime you can run TensorBoard by:

tensorboard --logdir ./logs/fit --port 8081

CLI explanation

You can train network by using Command-Line Interface. For now the following commands are compatible:

Command names Default value Explanation
-i, --input-shape 256 Flag defines the size of the image. If you entered 100, then the size of an input model expect will be (100, 100). Model compatible with squared images only (in the future all rectangle images may be supported.)
-b, --batch_size 128 Flag defines the minibatch size.
-e, --epochs 90 Flag defines the number of epochs model will train.
-p, --path_data None Flag defines the path to the dataset itself. For example: path_to_some_folder/ILSVRC
-m, --model_path None If specified model will start training with pretrained weights.
-v, --validate False If this flag is set to True the model will validate itself in at the end of each epoch.

Training

While training model saves the best results to the folder "checkpoint" and the intermediate result for each epoch in the folder "checkpoints-trimmed". Intermediate result is not full model, but only feature extraction part (without dense layers).

Without augmentation and specific tuning of hyperparameters, such as SGD learning rate model reached ~40% accuracy on validation dataset:

Accuracy:

Loss:

About

AlexNet with TensorFlow 2.13 implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages