Skip to content

Commit e07bcfb

Browse files
committed
Fix classification_privacy.ipynb
Fixed by calling `compute_dp_sgd_privacy_statement`.
1 parent 39c8a8c commit e07bcfb

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

g3doc/tutorials/classification_privacy.ipynb

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@
4646
"id": "MfBg1C5NB3X0"
4747
},
4848
"source": [
49-
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
50-
" \u003ctd\u003e\n",
51-
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/responsible_ai/privacy/tutorials/classification_privacy\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n",
52-
" \u003c/td\u003e\n",
53-
" \u003ctd\u003e\n",
54-
" \u003ca target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/privacy/blob/master/g3doc/tutorials/classification_privacy.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" /\u003eRun in Google Colab\u003c/a\u003e\n",
55-
" \u003c/td\u003e\n",
56-
" \u003ctd\u003e\n",
57-
" \u003ca target=\"_blank\" href=\"https://github.com/tensorflow/privacy/blob/master/g3doc/tutorials/classification_privacy.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" /\u003eView source on GitHub\u003c/a\u003e\n",
58-
" \u003c/td\u003e\n",
59-
" \u003ctd\u003e\n",
60-
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/privacy/g3doc/tutorials/classification_privacy.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
61-
" \u003c/td\u003e\n",
62-
"\u003c/table\u003e"
49+
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
50+
" <td>\n",
51+
" <a target=\"_blank\" href=\"https://www.tensorflow.org/responsible_ai/privacy/tutorials/classification_privacy\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n",
52+
" </td>\n",
53+
" <td>\n",
54+
" <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/privacy/blob/master/g3doc/tutorials/classification_privacy.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
55+
" </td>\n",
56+
" <td>\n",
57+
" <a target=\"_blank\" href=\"https://github.com/tensorflow/privacy/blob/master/g3doc/tutorials/classification_privacy.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n",
58+
" </td>\n",
59+
" <td>\n",
60+
" <a href=\"https://storage.googleapis.com/tensorflow_docs/privacy/g3doc/tutorials/classification_privacy.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />Download notebook</a>\n",
61+
" </td>\n",
62+
"</table>"
6363
]
6464
},
6565
{
@@ -417,11 +417,12 @@
417417
},
418418
"outputs": [],
419419
"source": [
420-
"compute_dp_sgd_privacy.compute_dp_sgd_privacy(n=train_data.shape[0],\n",
420+
"print(compute_dp_sgd_privacy.compute_dp_sgd_privacy_statement(\n",
421+
" number_of_examples=train_data.shape[0],\n",
421422
" batch_size=batch_size,\n",
422423
" noise_multiplier=noise_multiplier,\n",
423-
" epochs=epochs,\n",
424-
" delta=1e-5)"
424+
" num_epochs=epochs,\n",
425+
" delta=1e-5))"
425426
]
426427
},
427428
{
@@ -430,7 +431,7 @@
430431
"id": "c-KyttEWFRDc"
431432
},
432433
"source": [
433-
"The tool reports that for the hyperparameters chosen above, the trained model has an $\\epsilon$ value of 1.18."
434+
"The tool reports that for the hyperparameters chosen above, the trained model has an $\\epsilon$ value of 3.426."
434435
]
435436
},
436437
{

0 commit comments

Comments
 (0)