You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Choose-Your-Neuron: Incorporating Domain Knowledge into Deep Networks through Neuron-Importance]
Ramprasaath R. Selvaraju, Prithvijit Chattopadhyay, Mohammed Elhoseiny, Tilak Sharma, Dhruv Batra, Devi Parikh, Stefan Lee
Usage
This codebase assumes that you have installed Tensorflow. If not, please follow installation instructions from here.
Download data and pretrained checkpoints using sh download.sh and make sure the paths in the arg_config json files are correct.
You may also need to create an imagenet_files.pkl which contains a list of (atleast) 3000 randomly sampled imagenet image paths.
Train a Generalized Zero Shot Learning model on AWA2 and CUB (class-level attributes)
To do this, we first finetune the base model (vgg16 or resnet_v1) on a seen class images.
cd seen_pretraining/
sh cnn_finetune.sh
Extract Neuron Importances (alphas)
Change the ckpt_path from the config_json files to the trained checkpoint (obtained from above)
Extract Neuron-Importances (alphas) from the finetuned model.
sh alpha_extraction.sh
Domain knowledge to Neuron Importance:
Here we learn a transformation from domain knowledge (say attributes) to network neuron importances (alphas)