Skip to content

alessandrozamberletti/alexnet-finetune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlexNet-fine_tune

Layer-wise AlexNet fine-tuning.

AlexNet-fine_tune

alex_net = AlexNet(dataset.num_classes, 'res/alexnet-caffemodel.npy')
alex_net.fit(X_train, X_val, y_train, y_val, freeze=True, epochs=1000, lr=0.001)

when freeze=True layer-wise fine-tuning is performed (see: 1, 2).

Instructions

Use the following dataset structure: data/class_{0,..,K}/image_{0,..,N}.jpg.
Run:

$ python fine_tune.py

If the converted (source: caffe-tensorflow) caffemodel (source: BVLC) is not in res/, it will be downloaded from here.

Dependencies

$ python -V
Python 2.7.10
$ python -c 'import tensorflow as tf; print(tf.__version__)'
1.8.0

Resources

Original caffemodel and prototxt: [https://github.com/BVLC/caffe/tree/master/models/bvlc_alexnet]
Caffe-tensorflow conversion project: [https://github.com/ethereon/caffe-tensorflow]
Evaluation dataset: [https://www.kaggle.com/c/dogs-vs-cats]

Releases

No releases published

Packages

No packages published

Languages