Skip to content

Commit 76b0a59

Browse files
DualityGaptensorflow-copybara
authored andcommitted
Change the metric string from 'accuracy' to 'acc' to be compatible w/ both TF1.0 & 2.0
PiperOrigin-RevId: 300215182
1 parent a66236f commit 76b0a59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

g3doc/tutorials/adversarial_keras_cnn_mnist.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"outputs": [],
427427
"source": [
428428
"base_model.compile(optimizer='adam', loss='sparse_categorical_crossentropy',\n",
429-
" metrics=['accuracy'])\n",
429+
" metrics=['acc'])\n",
430430
"base_model.fit(train_dataset, epochs=HPARAMS.epochs)"
431431
]
432432
},
@@ -566,7 +566,7 @@
566566
"outputs": [],
567567
"source": [
568568
"adv_model.compile(optimizer='adam', loss='sparse_categorical_crossentropy',\n",
569-
" metrics=['accuracy'])\n",
569+
" metrics=['acc'])\n",
570570
"adv_model.fit(train_set_for_adv_model, epochs=HPARAMS.epochs)"
571571
]
572572
},
@@ -632,7 +632,7 @@
632632
"reference_model.compile(\n",
633633
" optimizer='adam',\n",
634634
" loss='sparse_categorical_crossentropy',\n",
635-
" metrics=['accuracy'])"
635+
" metrics=['acc'])"
636636
]
637637
},
638638
{

0 commit comments

Comments
 (0)