Skip to content

Commit 5303d7c

Browse files
csferngtensorflow-copybara
authored andcommitted
Clarify expected warnings in adversarial tutorial.
PiperOrigin-RevId: 290347223
1 parent 6e69973 commit 5303d7c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

g3doc/tutorials/adversarial_keras_cnn_mnist.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@
442442
"source": [
443443
"results = base_model.evaluate(test_dataset)\n",
444444
"named_results = dict(zip(base_model.metrics_names, results))\n",
445-
"print('accuracy:', named_results['accuracy'])"
445+
"print('\\naccuracy:', named_results['accuracy'])"
446446
]
447447
},
448448
{
@@ -548,7 +548,11 @@
548548
"id": "aKTQWzfj7JvL"
549549
},
550550
"source": [
551-
"Next we compile, train, and evaluate the adversarial-regularized model."
551+
"Next we compile, train, and evaluate the\n",
552+
"adversarial-regularized model. There might be warnings like\n",
553+
"\"Output missing from loss dictionary,\" which is fine because\n",
554+
"the `adv_model` doesn't rely on the base implementation to\n",
555+
"calculate the total loss."
552556
]
553557
},
554558
{
@@ -578,7 +582,7 @@
578582
"source": [
579583
"results = adv_model.evaluate(test_set_for_adv_model)\n",
580584
"named_results = dict(zip(adv_model.metrics_names, results))\n",
581-
"print('accuracy:', named_results['sparse_categorical_accuracy'])"
585+
"print('\\naccuracy:', named_results['sparse_categorical_accuracy'])"
582586
]
583587
},
584588
{

0 commit comments

Comments
 (0)