a tensorflow implementation of ICLR 2018 paper Learn To Pay Attention: https://arxiv.org/pdf/1804.02391
I implemented only one version: VGG-att-concat-dp, and I trained the model on CIFAR-10, CIFAR-100 DATASET. Finally, I use the pretrained CIFAR-100 model initialise the weights in CUB finetune.
python 3.6
tensorflow 1.4.0
numpy 1.12.0
skimage
Run python train.py --batch_size=64 --total_step=100000 --result_log='att.log'
Run python train.py --batch_size=64 --total_step=200000 --result_log='att.log'
Run python checkpoint_to_npy.py
to store the model of CIFAR100 dataset in .npy format.
Run python dataset_to_tfrecords.py
to get train.tfrecords
and test.tfrecords
of CUB-200-2011. Source data can be downloaded in Caltech-UCSD Webpage.
Run python main.py --batch_size=32 --learning_rate_start=1.6 --learning_rate_decay=0.5 --total_step=200000 --checkpoint_dir='./models/'
after 100000 steps, the accuracy with VGG-att2-concat-dp is reached 94.79%
in CIFAR10 dataset.
after 200000 steps, the accuracy with VGG-att2-concat-dp is reached 77.64%
in CIFAR100 dataset.
after 100000 steps, the finetune accuracy with VGG-att3-concat-dp is reached 73.25%
in CUB-200-2011.