DingfanChen / GS-WGAN

Official implementation of "GS-WGAN: A Gradient-Sanitized Approach for Learning Differentially Private Generators" (NeurIPS 2020)
MIT License
66 stars 21 forks source link

How to use the pretrained discriminator and generator files #14

Open AggarwalManav opened 7 months ago

AggarwalManav commented 7 months ago

With the pretrained generators and discriminators we can jump to result evaluations, but the program includes a certain structure of folders within which the trained architectures are to be placed. Could you please provide that hierarchy so that we could use the trained resources

DingfanChen commented 7 months ago

Hi, For training with pretrained discriminators: you could run the training script (i.e., source/main.py) by specifying the --load_dir to be the directory where you store the downloaded pretrained discriminators (it could be like 'results/mnist/pretrain/ResNet_default').

For evaluating with pretrained generator: you need to write few lines of codes for loading the model and generate samples (e.g., using the save_gen_data function from source/utils.py) and then provide the --gen_data argument to be the file path for the generated data when running the evaluation scripts.