Skip to content

Run DeepDIG against a new dataset or model

Hamid Karimi edited this page Jan 28, 2021 · 3 revisions

You can easily run DeepDIG against any other dataset or pre-trained model. You just need to make sure to follow the same format with our developed method.

  1. For each dataset, you need to develop an Autoencoder and name it ae.py e.g., look at this for MNIST.

  2. utils.py for a dataset contains four functions. get_original_data returns data and labels of a train or test set based on the argument. get_class_specific_data takes an index of a class (e.g., 1 for Trouser in FashionMNIST) as well as split (test and train) and return the relevant data. save_samples function saves samples (images) in a given directory (it uses imshow function in utils.py)

  3. For a particular (pre-trained) model, create a directory with an arbitrary name (this name will be the name of the pre-trained when running DeepDIG) e.g., 'GoogleNet' for CIFAR 10. Inside this folder, there are two files: model.py and train.py contains training and test procedures for the dataset for the model defined in model.py. Make sure the model returns scores (before softmax) and the features (before the linear model).

Clone this wiki locally