Browse Source

Fix issue #I1PURI [MA][diff_privacy][Func]the accuracy of diff_privacy tutorial not meet the requirment

tags/v0.7.0-beta
pkuliuliu 5 years ago
parent
commit
fcb2b37b79
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      example/mnist_demo/lenet5_config.py
  2. +1
    -1
      example/mnist_demo/lenet5_dp.py

+ 1
- 1
example/mnist_demo/lenet5_config.py View File

@@ -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


+ 1
- 1
example/mnist_demo/lenet5_dp.py View File

@@ -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'),


Loading…
Cancel
Save