From fcb2b37b7943fde6e966d4c45d852484f699366b Mon Sep 17 00:00:00 2001 From: pkuliuliu Date: Thu, 13 Aug 2020 20:28:08 +0800 Subject: [PATCH] Fix issue #I1PURI [MA][diff_privacy][Func]the accuracy of diff_privacy tutorial not meet the requirment --- example/mnist_demo/lenet5_config.py | 2 +- example/mnist_demo/lenet5_dp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/mnist_demo/lenet5_config.py b/example/mnist_demo/lenet5_config.py index f1a2745..896d7d0 100644 --- a/example/mnist_demo/lenet5_config.py +++ b/example/mnist_demo/lenet5_config.py @@ -22,7 +22,7 @@ mnist_cfg = edict({ 'num_classes': 10, # the number of classes of model's output 'lr': 0.01, # the learning rate of model's optimizer 'momentum': 0.9, # the momentum value of model's optimizer - 'epoch_size': 5, # training epochs + 'epoch_size': 10, # training epochs 'batch_size': 256, # batch size for training 'image_height': 32, # the height of training samples 'image_width': 32, # the width of training samples diff --git a/example/mnist_demo/lenet5_dp.py b/example/mnist_demo/lenet5_dp.py index 6468cd3..65aa63c 100644 --- a/example/mnist_demo/lenet5_dp.py +++ b/example/mnist_demo/lenet5_dp.py @@ -155,7 +155,7 @@ if __name__ == "__main__": dataset_sink_mode=cfg.dataset_sink_mode) LOGGER.info(TAG, "============== Starting Testing ==============") - ckpt_file_name = 'trained_ckpt_file/checkpoint_lenet-5_234.ckpt' + ckpt_file_name = 'trained_ckpt_file/checkpoint_lenet-10_234.ckpt' param_dict = load_checkpoint(ckpt_file_name) load_param_into_net(network, param_dict) ds_eval = generate_mnist_dataset(os.path.join(cfg.data_path, 'test'),