This is the pytorch implementation for paper: Learning Channel-wise Interactions for Binary Convolutional Neural Networks.
- python 3.5+
- pytorch 1.0.1
- keras 2.2.3
- other packages include numpy, tqdm
Our demo code is for the experiment on CIFAR-10 with the backbone of Resnet-20.
With all required packages, you can start using the code in the following way.
To train from scratch, run:
python main.pyTo train with pretrained backbone, run:
python main.py --pretrain 'path/to/weight'To evaluate, put the .npy files (xx.npy, yy.npy, influence_state.npy) in one directory, run:
python main.py --evaluate True --pretrain 'path/to/weight' --CI 'dir/to/npys'