From 29bfc6cc6cccad0e742c052cc5cf6c48f3e6fc71 Mon Sep 17 00:00:00 2001 From: Sayak Paul Date: Wed, 31 Mar 2021 14:04:11 +0530 Subject: [PATCH] Nice results --- CIFAR_10C_Evaluation.ipynb | 454 ++++++++++++++++++------------------- 1 file changed, 218 insertions(+), 236 deletions(-) diff --git a/CIFAR_10C_Evaluation.ipynb b/CIFAR_10C_Evaluation.ipynb index 934e808..b2a1148 100644 --- a/CIFAR_10C_Evaluation.ipynb +++ b/CIFAR_10C_Evaluation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "meaning-testing", + "id": "japanese-airfare", "metadata": {}, "source": [ "## Setup" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "medium-writing", + "id": "instrumental-viewer", "metadata": {}, "outputs": [ { @@ -21,19 +21,19 @@ "Downloading...\n", "From: https://drive.google.com/uc?id=1-0mtggsTMLDmbT7cmxdIBH25eAieTyGb\n", "To: /home/jupyter/teacher_model_swa.h5\n", - "94.6MB [00:01, 84.6MB/s]\n", + "94.6MB [00:01, 83.5MB/s]\n", "Downloading...\n", "From: https://drive.google.com/uc?id=1--EvBdSAnNaBtKozkMuja--lq8erN0uC\n", "To: /home/jupyter/student_noisy_swa.h5\n", - "94.6MB [00:01, 76.2MB/s]\n", + "94.6MB [00:01, 85.7MB/s]\n", "Downloading...\n", "From: https://drive.google.com/uc?id=1M0JwphtV6W1NM6V2Qv_VMTdjWdeAz6Sx\n", "To: /home/jupyter/teacher_model_ma.h5\n", - "94.6MB [00:00, 107MB/s] \n", + "94.6MB [00:01, 71.0MB/s]\n", "Downloading...\n", "From: https://drive.google.com/uc?id=1pW2hx6fkQGH8fXFfh8Fn8xPADuYBy5mG\n", "To: /home/jupyter/student_noisy_ma.h5\n", - "94.6MB [00:01, 76.7MB/s]\n" + "94.6MB [00:01, 63.9MB/s]\n" ] } ], @@ -49,8 +49,8 @@ }, { "cell_type": "code", - "execution_count": 13, - "id": "banner-complexity", + "execution_count": 2, + "id": "weird-declaration", "metadata": {}, "outputs": [], "source": [ @@ -66,7 +66,7 @@ }, { "cell_type": "markdown", - "id": "fuzzy-sullivan", + "id": "hidden-institute", "metadata": {}, "source": [ "## Define Hyperparameters" @@ -74,8 +74,8 @@ }, { "cell_type": "code", - "execution_count": 15, - "id": "moved-fountain", + "execution_count": 3, + "id": "complimentary-trust", "metadata": {}, "outputs": [], "source": [ @@ -87,8 +87,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "sticky-antibody", + "execution_count": 4, + "id": "aggressive-headquarters", "metadata": {}, "outputs": [ { @@ -127,7 +127,7 @@ }, { "cell_type": "markdown", - "id": "incredible-lebanon", + "id": "dried-ladder", "metadata": {}, "source": [ "## Utilities" @@ -136,7 +136,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "compliant-malpractice", + "id": "informational-david", "metadata": {}, "outputs": [], "source": [ @@ -152,8 +152,8 @@ }, { "cell_type": "code", - "execution_count": 11, - "id": "composed-canal", + "execution_count": 6, + "id": "duplicate-concert", "metadata": {}, "outputs": [], "source": [ @@ -177,8 +177,8 @@ }, { "cell_type": "code", - "execution_count": 9, - "id": "boxed-settlement", + "execution_count": 7, + "id": "posted-crazy", "metadata": {}, "outputs": [], "source": [ @@ -202,16 +202,24 @@ }, { "cell_type": "markdown", - "id": "english-eleven", + "id": "ignored-plant", "metadata": {}, "source": [ "## Evaluation" ] }, + { + "cell_type": "markdown", + "id": "spectacular-prefix", + "metadata": {}, + "source": [ + "### SWA" + ] + }, { "cell_type": "code", - "execution_count": 16, - "id": "latest-placement", + "execution_count": 8, + "id": "standard-shareware", "metadata": {}, "outputs": [ { @@ -232,218 +240,194 @@ "name": "stderr", "output_type": "stream", "text": [ - " 5%|▌ | 1/19 [00:17<05:20, 17.80s/it]" + " 5%|▌ | 1/19 [00:19<05:43, 19.09s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on brightness_5: 75.60999989509583%\n", - "Processing contrast_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/contrast_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/contrast_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on brightness_5: 76.05999708175659%\n", + "Processing contrast_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 11%|█ | 2/19 [00:28<03:53, 13.74s/it]" + " 11%|█ | 2/19 [00:21<02:36, 9.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on contrast_5: 20.739999413490295%\n", - "Processing defocus_blur_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/defocus_blur_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/defocus_blur_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on contrast_5: 24.34999942779541%\n", + "Processing defocus_blur_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 16%|█▌ | 3/19 [00:38<03:12, 12.01s/it]" + " 16%|█▌ | 3/19 [00:23<01:36, 6.05s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on defocus_blur_5: 72.04999923706055%\n", - "Processing elastic_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/elastic_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/elastic_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on defocus_blur_5: 71.59000039100647%\n", + "Processing elastic_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 21%|██ | 4/19 [00:48<02:47, 11.17s/it]" + " 21%|██ | 4/19 [00:25<01:08, 4.56s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on elastic_5: 74.59999918937683%\n", - "Processing fog_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/fog_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/fog_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on elastic_5: 74.19999837875366%\n", + "Processing fog_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 26%|██▋ | 5/19 [00:58<02:29, 10.70s/it]" + " 26%|██▋ | 5/19 [00:28<00:52, 3.73s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on fog_5: 49.43000078201294%\n", - "Processing frost_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/frost_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/frost_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on fog_5: 48.28999936580658%\n", + "Processing frost_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 32%|███▏ | 6/19 [01:07<02:13, 10.31s/it]" + " 32%|███▏ | 6/19 [00:30<00:42, 3.28s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frost_5: 59.210002422332764%\n", - "Processing frosted_glass_blur_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/frosted_glass_blur_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/frosted_glass_blur_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on frost_5: 62.26999759674072%\n", + "Processing frosted_glass_blur_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 37%|███▋ | 7/19 [01:17<02:02, 10.19s/it]" + " 37%|███▋ | 7/19 [00:32<00:35, 2.99s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frosted_glass_blur_5: 58.969998359680176%\n", - "Processing gaussian_blur_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/gaussian_blur_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/gaussian_blur_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on frosted_glass_blur_5: 58.980000019073486%\n", + "Processing gaussian_blur_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 42%|████▏ | 8/19 [01:27<01:51, 10.10s/it]" + " 42%|████▏ | 8/19 [00:35<00:30, 2.77s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_blur_5: 66.78000092506409%\n", - "Processing gaussian_noise_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/gaussian_noise_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/gaussian_noise_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on gaussian_blur_5: 66.60000085830688%\n", + "Processing gaussian_noise_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 47%|████▋ | 9/19 [01:37<01:40, 10.08s/it]" + " 47%|████▋ | 9/19 [00:37<00:26, 2.62s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_noise_5: 40.02000093460083%\n", - "Processing impulse_noise_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/impulse_noise_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/impulse_noise_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on gaussian_noise_5: 41.909998655319214%\n", + "Processing impulse_noise_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 53%|█████▎ | 10/19 [01:47<01:30, 10.05s/it]" + " 53%|█████▎ | 10/19 [00:39<00:22, 2.52s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on impulse_noise_5: 21.81999981403351%\n", - "Processing jpeg_compression_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/jpeg_compression_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/jpeg_compression_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on impulse_noise_5: 23.970000445842743%\n", + "Processing jpeg_compression_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 58%|█████▊ | 11/19 [01:57<01:20, 10.04s/it]" + " 58%|█████▊ | 11/19 [00:42<00:19, 2.44s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on jpeg_compression_5: 79.03000116348267%\n", - "Processing motion_blur_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/motion_blur_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/motion_blur_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on jpeg_compression_5: 79.1599988937378%\n", + "Processing motion_blur_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 63%|██████▎ | 12/19 [02:07<01:10, 10.02s/it]" + " 63%|██████▎ | 12/19 [00:44<00:16, 2.39s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on motion_blur_5: 66.29999876022339%\n", - "Processing pixelate_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/pixelate_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/pixelate_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on motion_blur_5: 65.77000021934509%\n", + "Processing pixelate_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 68%|██████▊ | 13/19 [02:17<01:00, 10.04s/it]" + " 68%|██████▊ | 13/19 [00:46<00:14, 2.35s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on pixelate_5: 74.88999962806702%\n", + "Test accuracy on pixelate_5: 73.51999878883362%\n", "Processing saturate_5\n" ] }, @@ -451,100 +435,90 @@ "name": "stderr", "output_type": "stream", "text": [ - " 74%|███████▎ | 14/19 [02:20<00:38, 7.68s/it]" + " 74%|███████▎ | 14/19 [00:49<00:11, 2.37s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on saturate_5: 67.79000163078308%\n", - "Processing shot_noise_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/shot_noise_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/shot_noise_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on saturate_5: 69.6399986743927%\n", + "Processing shot_noise_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 79%|███████▉ | 15/19 [02:29<00:33, 8.34s/it]" + " 79%|███████▉ | 15/19 [00:51<00:09, 2.32s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on shot_noise_5: 45.260000228881836%\n", - "Processing snow_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/snow_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/snow_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on shot_noise_5: 45.21999955177307%\n", + "Processing snow_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 84%|████████▍ | 16/19 [02:39<00:26, 8.73s/it]" + " 84%|████████▍ | 16/19 [00:53<00:06, 2.31s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on snow_5: 63.419997692108154%\n", - "Processing spatter_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/spatter_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/spatter_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on snow_5: 65.39999842643738%\n", + "Processing spatter_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 89%|████████▉ | 17/19 [02:49<00:18, 9.10s/it]" + " 89%|████████▉ | 17/19 [00:55<00:04, 2.29s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on spatter_5: 63.88000249862671%\n", - "Processing speckle_noise_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/speckle_noise_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/speckle_noise_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on spatter_5: 64.16000127792358%\n", + "Processing speckle_noise_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - " 95%|█████████▍| 18/19 [02:59<00:09, 9.37s/it]" + " 95%|█████████▍| 18/19 [00:58<00:02, 2.28s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on speckle_noise_5: 46.880000829696655%\n", - "Processing zoom_blur_5\n", - "\u001b[1mDownloading and preparing dataset 2.72 GiB (download: 2.72 GiB, generated: Unknown size, total: 2.72 GiB) to /home/jupyter/tensorflow_datasets/cifar10_corrupted/zoom_blur_5/1.0.0...\u001b[0m\n", - "\u001b[1mDataset cifar10_corrupted downloaded and prepared to /home/jupyter/tensorflow_datasets/cifar10_corrupted/zoom_blur_5/1.0.0. Subsequent calls will reuse this data.\u001b[0m\n" + "Test accuracy on speckle_noise_5: 45.62999904155731%\n", + "Processing zoom_blur_5\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 19/19 [03:09<00:00, 9.97s/it]" + "100%|██████████| 19/19 [01:00<00:00, 3.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on zoom_blur_5: 78.329998254776%\n", - "59.21105271891544\n" + "Test accuracy on zoom_blur_5: 77.49000191688538%\n", + "Mean Top-1 Accuracy: 59.695262579541456%\n" ] }, { @@ -562,13 +536,13 @@ "teacher_model_swa.compile(loss=\"sparse_categorical_crossentropy\",\n", " metrics=[\"accuracy\"])\n", "acc_dict, mean_top_1 = evaluate_model(teacher_model_swa)\n", - "print(mean_top_1)" + "print(f\"Mean Top-1 Accuracy: {mean_top_1}%\")" ] }, { "cell_type": "code", - "execution_count": 17, - "id": "comparative-indian", + "execution_count": 9, + "id": "suffering-plaintiff", "metadata": {}, "outputs": [ { @@ -589,14 +563,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 5%|▌ | 1/19 [00:03<01:03, 3.52s/it]" + " 5%|▌ | 1/19 [00:03<01:00, 3.35s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on brightness_5: 80.91999888420105%\n", + "Test accuracy on brightness_5: 82.91000127792358%\n", "Processing contrast_5\n" ] }, @@ -604,14 +578,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 11%|█ | 2/19 [00:05<00:45, 2.70s/it]" + " 11%|█ | 2/19 [00:05<00:44, 2.64s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on contrast_5: 23.080000281333923%\n", + "Test accuracy on contrast_5: 29.730001091957092%\n", "Processing defocus_blur_5\n" ] }, @@ -619,14 +593,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 16%|█▌ | 3/19 [00:07<00:39, 2.45s/it]" + " 16%|█▌ | 3/19 [00:07<00:38, 2.42s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on defocus_blur_5: 70.6499993801117%\n", + "Test accuracy on defocus_blur_5: 73.00000190734863%\n", "Processing elastic_5\n" ] }, @@ -634,14 +608,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 21%|██ | 4/19 [00:09<00:34, 2.33s/it]" + " 21%|██ | 4/19 [00:09<00:34, 2.31s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on elastic_5: 72.32999801635742%\n", + "Test accuracy on elastic_5: 74.29999709129333%\n", "Processing fog_5\n" ] }, @@ -649,14 +623,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 26%|██▋ | 5/19 [00:12<00:31, 2.25s/it]" + " 26%|██▋ | 5/19 [00:11<00:31, 2.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on fog_5: 47.690001130104065%\n", + "Test accuracy on fog_5: 50.26000142097473%\n", "Processing frost_5\n" ] }, @@ -664,14 +638,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 32%|███▏ | 6/19 [00:14<00:28, 2.21s/it]" + " 32%|███▏ | 6/19 [00:14<00:28, 2.22s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frost_5: 58.8699996471405%\n", + "Test accuracy on frost_5: 58.92000198364258%\n", "Processing frosted_glass_blur_5\n" ] }, @@ -679,14 +653,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 37%|███▋ | 7/19 [00:16<00:26, 2.18s/it]" + " 37%|███▋ | 7/19 [00:16<00:26, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frosted_glass_blur_5: 58.789998292922974%\n", + "Test accuracy on frosted_glass_blur_5: 59.78999733924866%\n", "Processing gaussian_blur_5\n" ] }, @@ -694,14 +668,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 42%|████▏ | 8/19 [00:18<00:23, 2.17s/it]" + " 42%|████▏ | 8/19 [00:18<00:24, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_blur_5: 65.67999720573425%\n", + "Test accuracy on gaussian_blur_5: 67.93000102043152%\n", "Processing gaussian_noise_5\n" ] }, @@ -709,14 +683,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 47%|████▋ | 9/19 [00:20<00:21, 2.16s/it]" + " 47%|████▋ | 9/19 [00:20<00:21, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_noise_5: 43.43999922275543%\n", + "Test accuracy on gaussian_noise_5: 46.25999927520752%\n", "Processing impulse_noise_5\n" ] }, @@ -724,14 +698,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 53%|█████▎ | 10/19 [00:22<00:19, 2.16s/it]" + " 53%|█████▎ | 10/19 [00:22<00:19, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on impulse_noise_5: 25.839999318122864%\n", + "Test accuracy on impulse_noise_5: 30.98999857902527%\n", "Processing jpeg_compression_5\n" ] }, @@ -739,14 +713,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 58%|█████▊ | 11/19 [00:24<00:17, 2.15s/it]" + " 58%|█████▊ | 11/19 [00:24<00:17, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on jpeg_compression_5: 75.58000087738037%\n", + "Test accuracy on jpeg_compression_5: 76.39999985694885%\n", "Processing motion_blur_5\n" ] }, @@ -754,14 +728,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 63%|██████▎ | 12/19 [00:27<00:14, 2.14s/it]" + " 63%|██████▎ | 12/19 [00:27<00:15, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on motion_blur_5: 64.92999792098999%\n", + "Test accuracy on motion_blur_5: 66.72000288963318%\n", "Processing pixelate_5\n" ] }, @@ -769,14 +743,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 68%|██████▊ | 13/19 [00:29<00:12, 2.14s/it]" + " 68%|██████▊ | 13/19 [00:29<00:12, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on pixelate_5: 72.46000170707703%\n", + "Test accuracy on pixelate_5: 73.94999861717224%\n", "Processing saturate_5\n" ] }, @@ -784,14 +758,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 74%|███████▎ | 14/19 [00:31<00:10, 2.14s/it]" + " 74%|███████▎ | 14/19 [00:31<00:10, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on saturate_5: 76.910001039505%\n", + "Test accuracy on saturate_5: 81.05000257492065%\n", "Processing shot_noise_5\n" ] }, @@ -799,14 +773,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 79%|███████▉ | 15/19 [00:33<00:08, 2.14s/it]" + " 79%|███████▉ | 15/19 [00:33<00:08, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on shot_noise_5: 48.48000109195709%\n", + "Test accuracy on shot_noise_5: 51.88000202178955%\n", "Processing snow_5\n" ] }, @@ -814,14 +788,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 84%|████████▍ | 16/19 [00:35<00:06, 2.14s/it]" + " 84%|████████▍ | 16/19 [00:35<00:06, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on snow_5: 64.27000164985657%\n", + "Test accuracy on snow_5: 65.82000255584717%\n", "Processing spatter_5\n" ] }, @@ -829,14 +803,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 89%|████████▉ | 17/19 [00:37<00:04, 2.13s/it]" + " 89%|████████▉ | 17/19 [00:37<00:04, 2.15s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on spatter_5: 66.00000262260437%\n", + "Test accuracy on spatter_5: 70.31999826431274%\n", "Processing speckle_noise_5\n" ] }, @@ -844,14 +818,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 95%|█████████▍| 18/19 [00:39<00:02, 2.13s/it]" + " 95%|█████████▍| 18/19 [00:39<00:02, 2.14s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on speckle_noise_5: 48.85999858379364%\n", + "Test accuracy on speckle_noise_5: 53.46999764442444%\n", "Processing zoom_blur_5\n" ] }, @@ -859,15 +833,15 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 19/19 [00:41<00:00, 2.21s/it]" + "100%|██████████| 19/19 [00:42<00:00, 2.21s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on zoom_blur_5: 77.31000185012817%\n", - "60.10999993274086\n" + "Test accuracy on zoom_blur_5: 79.67000007629395%\n", + "Mean Top-1 Accuracy: 62.80894765728399%\n" ] }, { @@ -885,13 +859,21 @@ "student_noisy_swa.compile(loss=\"sparse_categorical_crossentropy\",\n", " metrics=[\"accuracy\"])\n", "acc_dict, mean_top_1 = evaluate_model(student_noisy_swa)\n", - "print(mean_top_1)" + "print(f\"Mean Top-1 Accuracy: {mean_top_1}%\")" + ] + }, + { + "cell_type": "markdown", + "id": "separated-rider", + "metadata": {}, + "source": [ + "### MA" ] }, { "cell_type": "code", - "execution_count": 18, - "id": "handed-acting", + "execution_count": 10, + "id": "departmental-generation", "metadata": {}, "outputs": [ { @@ -912,14 +894,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 5%|▌ | 1/19 [00:03<00:58, 3.25s/it]" + " 5%|▌ | 1/19 [00:03<01:00, 3.37s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on brightness_5: 72.39000201225281%\n", + "Test accuracy on brightness_5: 73.14000129699707%\n", "Processing contrast_5\n" ] }, @@ -927,14 +909,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 11%|█ | 2/19 [00:05<00:43, 2.58s/it]" + " 11%|█ | 2/19 [00:05<00:45, 2.65s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on contrast_5: 21.649999916553497%\n", + "Test accuracy on contrast_5: 19.679999351501465%\n", "Processing defocus_blur_5\n" ] }, @@ -942,14 +924,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 16%|█▌ | 3/19 [00:07<00:37, 2.36s/it]" + " 16%|█▌ | 3/19 [00:07<00:38, 2.43s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on defocus_blur_5: 71.20000123977661%\n", + "Test accuracy on defocus_blur_5: 71.5499997138977%\n", "Processing elastic_5\n" ] }, @@ -957,14 +939,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 21%|██ | 4/19 [00:09<00:33, 2.26s/it]" + " 21%|██ | 4/19 [00:09<00:34, 2.32s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on elastic_5: 72.49000072479248%\n", + "Test accuracy on elastic_5: 74.76999759674072%\n", "Processing fog_5\n" ] }, @@ -972,14 +954,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 26%|██▋ | 5/19 [00:11<00:30, 2.21s/it]" + " 26%|██▋ | 5/19 [00:11<00:31, 2.26s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on fog_5: 45.14000117778778%\n", + "Test accuracy on fog_5: 47.96999990940094%\n", "Processing frost_5\n" ] }, @@ -987,14 +969,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 32%|███▏ | 6/19 [00:13<00:28, 2.17s/it]" + " 32%|███▏ | 6/19 [00:14<00:28, 2.22s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frost_5: 60.29000282287598%\n", + "Test accuracy on frost_5: 61.29999756813049%\n", "Processing frosted_glass_blur_5\n" ] }, @@ -1002,14 +984,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 37%|███▋ | 7/19 [00:15<00:25, 2.15s/it]" + " 37%|███▋ | 7/19 [00:16<00:26, 2.21s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frosted_glass_blur_5: 60.97999811172485%\n", + "Test accuracy on frosted_glass_blur_5: 61.41999959945679%\n", "Processing gaussian_blur_5\n" ] }, @@ -1017,14 +999,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 42%|████▏ | 8/19 [00:18<00:23, 2.14s/it]" + " 42%|████▏ | 8/19 [00:18<00:24, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_blur_5: 66.53000116348267%\n", + "Test accuracy on gaussian_blur_5: 66.03000164031982%\n", "Processing gaussian_noise_5\n" ] }, @@ -1032,14 +1014,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 47%|████▋ | 9/19 [00:20<00:21, 2.13s/it]" + " 47%|████▋ | 9/19 [00:20<00:21, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_noise_5: 43.389999866485596%\n", + "Test accuracy on gaussian_noise_5: 45.899999141693115%\n", "Processing impulse_noise_5\n" ] }, @@ -1047,14 +1029,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 53%|█████▎ | 10/19 [00:22<00:19, 2.12s/it]" + " 53%|█████▎ | 10/19 [00:22<00:19, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on impulse_noise_5: 21.490000188350677%\n", + "Test accuracy on impulse_noise_5: 30.320000648498535%\n", "Processing jpeg_compression_5\n" ] }, @@ -1062,14 +1044,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 58%|█████▊ | 11/19 [00:24<00:16, 2.12s/it]" + " 58%|█████▊ | 11/19 [00:25<00:17, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on jpeg_compression_5: 77.93999910354614%\n", + "Test accuracy on jpeg_compression_5: 78.4600019454956%\n", "Processing motion_blur_5\n" ] }, @@ -1077,14 +1059,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 63%|██████▎ | 12/19 [00:26<00:14, 2.12s/it]" + " 63%|██████▎ | 12/19 [00:27<00:15, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on motion_blur_5: 64.2799973487854%\n", + "Test accuracy on motion_blur_5: 64.19000029563904%\n", "Processing pixelate_5\n" ] }, @@ -1092,14 +1074,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 68%|██████▊ | 13/19 [00:28<00:12, 2.12s/it]" + " 68%|██████▊ | 13/19 [00:29<00:13, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on pixelate_5: 75.16000270843506%\n", + "Test accuracy on pixelate_5: 72.26999998092651%\n", "Processing saturate_5\n" ] }, @@ -1107,14 +1089,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 74%|███████▎ | 14/19 [00:30<00:10, 2.11s/it]" + " 74%|███████▎ | 14/19 [00:31<00:10, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on saturate_5: 66.47999882698059%\n", + "Test accuracy on saturate_5: 66.04999899864197%\n", "Processing shot_noise_5\n" ] }, @@ -1122,14 +1104,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 79%|███████▉ | 15/19 [00:32<00:08, 2.11s/it]" + " 79%|███████▉ | 15/19 [00:33<00:08, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on shot_noise_5: 48.179998993873596%\n", + "Test accuracy on shot_noise_5: 49.36999976634979%\n", "Processing snow_5\n" ] }, @@ -1137,14 +1119,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 84%|████████▍ | 16/19 [00:34<00:06, 2.11s/it]" + " 84%|████████▍ | 16/19 [00:35<00:06, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on snow_5: 63.70999813079834%\n", + "Test accuracy on snow_5: 63.60999941825867%\n", "Processing spatter_5\n" ] }, @@ -1152,14 +1134,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 89%|████████▉ | 17/19 [00:36<00:04, 2.11s/it]" + " 89%|████████▉ | 17/19 [00:38<00:04, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on spatter_5: 61.169999837875366%\n", + "Test accuracy on spatter_5: 63.8700008392334%\n", "Processing speckle_noise_5\n" ] }, @@ -1167,14 +1149,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 95%|█████████▍| 18/19 [00:39<00:02, 2.11s/it]" + " 95%|█████████▍| 18/19 [00:40<00:02, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on speckle_noise_5: 48.2699990272522%\n", + "Test accuracy on speckle_noise_5: 49.75000023841858%\n", "Processing zoom_blur_5\n" ] }, @@ -1182,15 +1164,15 @@ "name": "stderr", "output_type": "stream", "text": [ - "100%|██████████| 19/19 [00:41<00:00, 2.17s/it]" + "100%|██████████| 19/19 [00:42<00:00, 2.24s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on zoom_blur_5: 76.78999900817871%\n", - "58.81736843209518\n" + "Test accuracy on zoom_blur_5: 78.32000255584717%\n", + "Mean Top-1 Accuracy: 59.89315792133934%\n" ] }, { @@ -1208,13 +1190,13 @@ "teacher_model_ma.compile(loss=\"sparse_categorical_crossentropy\",\n", " metrics=[\"accuracy\"])\n", "acc_dict, mean_top_1 = evaluate_model(teacher_model_ma)\n", - "print(mean_top_1)" + "print(f\"Mean Top-1 Accuracy: {mean_top_1}%\")" ] }, { "cell_type": "code", - "execution_count": 19, - "id": "surrounded-minnesota", + "execution_count": 11, + "id": "virgin-history", "metadata": {}, "outputs": [ { @@ -1242,7 +1224,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on brightness_5: 78.72999906539917%\n", + "Test accuracy on brightness_5: 81.80999755859375%\n", "Processing contrast_5\n" ] }, @@ -1250,14 +1232,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 11%|█ | 2/19 [00:05<00:44, 2.62s/it]" + " 11%|█ | 2/19 [00:05<00:44, 2.63s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on contrast_5: 20.520000159740448%\n", + "Test accuracy on contrast_5: 28.65999937057495%\n", "Processing defocus_blur_5\n" ] }, @@ -1265,14 +1247,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 16%|█▌ | 3/19 [00:07<00:38, 2.41s/it]" + " 16%|█▌ | 3/19 [00:07<00:38, 2.42s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on defocus_blur_5: 64.96999859809875%\n", + "Test accuracy on defocus_blur_5: 70.93999981880188%\n", "Processing elastic_5\n" ] }, @@ -1280,14 +1262,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 21%|██ | 4/19 [00:09<00:34, 2.31s/it]" + " 21%|██ | 4/19 [00:09<00:34, 2.32s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on elastic_5: 69.12000179290771%\n", + "Test accuracy on elastic_5: 72.43000268936157%\n", "Processing fog_5\n" ] }, @@ -1302,7 +1284,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on fog_5: 45.71000039577484%\n", + "Test accuracy on fog_5: 49.43999946117401%\n", "Processing frost_5\n" ] }, @@ -1310,14 +1292,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 32%|███▏ | 6/19 [00:14<00:28, 2.22s/it]" + " 32%|███▏ | 6/19 [00:14<00:28, 2.23s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frost_5: 52.34000086784363%\n", + "Test accuracy on frost_5: 60.009998083114624%\n", "Processing frosted_glass_blur_5\n" ] }, @@ -1325,14 +1307,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 37%|███▋ | 7/19 [00:16<00:27, 2.28s/it]" + " 37%|███▋ | 7/19 [00:16<00:26, 2.20s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on frosted_glass_blur_5: 56.199997663497925%\n", + "Test accuracy on frosted_glass_blur_5: 58.139997720718384%\n", "Processing gaussian_blur_5\n" ] }, @@ -1340,14 +1322,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 42%|████▏ | 8/19 [00:18<00:24, 2.24s/it]" + " 42%|████▏ | 8/19 [00:18<00:24, 2.19s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_blur_5: 59.32999849319458%\n", + "Test accuracy on gaussian_blur_5: 65.90999960899353%\n", "Processing gaussian_noise_5\n" ] }, @@ -1355,14 +1337,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 47%|████▋ | 9/19 [00:20<00:22, 2.20s/it]" + " 47%|████▋ | 9/19 [00:20<00:21, 2.18s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on gaussian_noise_5: 43.25999915599823%\n", + "Test accuracy on gaussian_noise_5: 47.00999855995178%\n", "Processing impulse_noise_5\n" ] }, @@ -1370,14 +1352,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 53%|█████▎ | 10/19 [00:22<00:19, 2.19s/it]" + " 53%|█████▎ | 10/19 [00:22<00:19, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on impulse_noise_5: 26.96000039577484%\n", + "Test accuracy on impulse_noise_5: 29.399999976158142%\n", "Processing jpeg_compression_5\n" ] }, @@ -1385,14 +1367,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 58%|█████▊ | 11/19 [00:25<00:17, 2.17s/it]" + " 58%|█████▊ | 11/19 [00:24<00:17, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on jpeg_compression_5: 74.3399977684021%\n", + "Test accuracy on jpeg_compression_5: 76.10999941825867%\n", "Processing motion_blur_5\n" ] }, @@ -1400,14 +1382,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 63%|██████▎ | 12/19 [00:27<00:15, 2.16s/it]" + " 63%|██████▎ | 12/19 [00:27<00:15, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on motion_blur_5: 58.810001611709595%\n", + "Test accuracy on motion_blur_5: 65.93000292778015%\n", "Processing pixelate_5\n" ] }, @@ -1415,14 +1397,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 68%|██████▊ | 13/19 [00:29<00:12, 2.15s/it]" + " 68%|██████▊ | 13/19 [00:29<00:13, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on pixelate_5: 73.48999977111816%\n", + "Test accuracy on pixelate_5: 71.3699996471405%\n", "Processing saturate_5\n" ] }, @@ -1430,14 +1412,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 74%|███████▎ | 14/19 [00:31<00:10, 2.15s/it]" + " 74%|███████▎ | 14/19 [00:31<00:10, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on saturate_5: 77.53999829292297%\n", + "Test accuracy on saturate_5: 80.47000169754028%\n", "Processing shot_noise_5\n" ] }, @@ -1445,14 +1427,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 79%|███████▉ | 15/19 [00:33<00:08, 2.15s/it]" + " 79%|███████▉ | 15/19 [00:33<00:08, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on shot_noise_5: 47.56999909877777%\n", + "Test accuracy on shot_noise_5: 51.42999887466431%\n", "Processing snow_5\n" ] }, @@ -1460,14 +1442,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 84%|████████▍ | 16/19 [00:35<00:06, 2.15s/it]" + " 84%|████████▍ | 16/19 [00:35<00:06, 2.16s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on snow_5: 59.24999713897705%\n", + "Test accuracy on snow_5: 66.38000011444092%\n", "Processing spatter_5\n" ] }, @@ -1475,14 +1457,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 89%|████████▉ | 17/19 [00:37<00:04, 2.15s/it]" + " 89%|████████▉ | 17/19 [00:37<00:04, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on spatter_5: 66.25000238418579%\n", + "Test accuracy on spatter_5: 70.24000287055969%\n", "Processing speckle_noise_5\n" ] }, @@ -1490,14 +1472,14 @@ "name": "stderr", "output_type": "stream", "text": [ - " 95%|█████████▍| 18/19 [00:40<00:02, 2.15s/it]" + " 95%|█████████▍| 18/19 [00:40<00:02, 2.17s/it]" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on speckle_noise_5: 48.42999875545502%\n", + "Test accuracy on speckle_noise_5: 52.27000117301941%\n", "Processing zoom_blur_5\n" ] }, @@ -1512,8 +1494,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "Test accuracy on zoom_blur_5: 72.94999957084656%\n", - "57.67210478845396\n" + "Test accuracy on zoom_blur_5: 77.46000289916992%\n", + "Mean Top-1 Accuracy: 61.863684340527186%\n" ] }, { @@ -1531,7 +1513,7 @@ "student_noisy_ma.compile(loss=\"sparse_categorical_crossentropy\",\n", " metrics=[\"accuracy\"])\n", "acc_dict, mean_top_1 = evaluate_model(student_noisy_ma)\n", - "print(mean_top_1)" + "print(f\"Mean Top-1 Accuracy: {mean_top_1}%\")" ] } ],