This is an implementation of the paper Interpretable Convolutional Neural Networks via Feedforward Design,
maintained by Min Zhang and Jiali Duan.
[Requirements]
[Dataset] ( Hand-written digits classification)
[Installation] (rensorflow, keras, pickle, sklearn and skimage)
[Feedforward Steps]
python Getkernel.py
, getting convolutional layers kernelspython Getfeature.py
, getting feature after convolutionpython Getweight.py
, getting fully connected layers kernels and training accuracypython mnist_test.py
or python test.py
, getting test accuracy[Adversarial attacks]
dataset_structure_model
show_sample.ipynb
to visualize generated adversarial samples[Example usage]
python cifar_keras.py -train_dir cifar_BP_model -filename cifar.ckpt -method FGSM
python cifar_keras.py -train_dir cifar_ff_model -filename FF_init_model.ckpt -method BIM
cifar_keras.py:
--batch_size: Size of training batches
(default: '128')
(an integer)
--filename: Checkpoint filename.
(default: 'FF_init_model.ckpt')
--learning_rate: Learning rate for training
(default: '0.001')
(a number)
--[no]load_model: Load saved model or train.
(default: 'true')
--method: Adversarial attack method
(default: 'FGSM')
--nb_epochs: Number of epochs to train model
(default: '40')
(an integer)
--train_dir: Directory where to save model.
(default: 'cifar_ff_model')
Jiali Duan (Email: jialidua@usc.edu)
Min Zhang (Email: zhan980@usc.edu)