Skip to content

Commit ea1af90

Browse files
committed
2 parents 8326f5b + 100e371 commit ea1af90

File tree

3 files changed

+22
-49
lines changed

3 files changed

+22
-49
lines changed

research/denoised_smoothing/notebooks/Certification_Test.ipynb

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"colab_type": "text"
4242
},
4343
"source": [
44-
"<a href=\"https://colab.research.google.com/github/sayakpaul/Denoised-Smoothing-TF/blob/main/Certification_Test.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
44+
"<a href=\"https://colab.research.google.com/github/sayakpaul/neural-structured-learning/blob/master/research/denoised_smoothing/notebooks/Certification_Test.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
4545
]
4646
},
4747
{
@@ -70,8 +70,8 @@
7070
"id": "FDlxwScPHSW_"
7171
},
7272
"source": [
73-
"!git clone https://github.com/sayakpaul/Denoised-Smoothing-TF\n",
74-
"!cd Denoised-Smoothing-TF && tar xf models.tar.gz"
73+
"!git clone https://github.com/sayakpaul/neural-structured-learning\n",
74+
"!cd neural-structured-learning/research/denoised_smoothing && tar xf models.tar.gz"
7575
],
7676
"execution_count": null,
7777
"outputs": []
@@ -83,7 +83,7 @@
8383
},
8484
"source": [
8585
"import sys\n",
86-
"sys.path.append(\"Denoised-Smoothing-TF\")\n",
86+
"sys.path.append(\"neural-structured-learning/research/denoised_smoothing\")\n",
8787
"\n",
8888
"from scripts import certify, analyze\n",
8989
"import matplotlib.pyplot as plt\n",
@@ -108,11 +108,7 @@
108108
{
109109
"cell_type": "code",
110110
"metadata": {
111-
"colab": {
112-
"base_uri": "https://localhost:8080/"
113-
},
114-
"id": "Dzhq0lXNHssc",
115-
"outputId": "2b184ca9-4c2b-4df0-8a2f-b00a407b75d4"
111+
"id": "Dzhq0lXNHssc"
116112
},
117113
"source": [
118114
"print(\"Loading models.\")\n",
@@ -122,18 +118,7 @@
122118
"print(\"Models loaded.\")"
123119
],
124120
"execution_count": null,
125-
"outputs": [
126-
{
127-
"output_type": "stream",
128-
"text": [
129-
"Loading models.\n",
130-
"WARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\n",
131-
"WARNING:tensorflow:No training configuration found in save file, so the model was *not* compiled. Compile it manually.\n",
132-
"Models loaded.\n"
133-
],
134-
"name": "stdout"
135-
}
136-
]
121+
"outputs": []
137122
},
138123
{
139124
"cell_type": "markdown",
@@ -147,11 +132,7 @@
147132
{
148133
"cell_type": "code",
149134
"metadata": {
150-
"colab": {
151-
"base_uri": "https://localhost:8080/"
152-
},
153-
"id": "flIat9vpJqpl",
154-
"outputId": "ba351f95-acfd-4b0f-e757-08881c1a7890"
135+
"id": "flIat9vpJqpl"
155136
},
156137
"source": [
157138
"(x_train, _), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()\n",
@@ -163,15 +144,7 @@
163144
"norm_layer.adapt(x_train/255.0) # Notice the scaling step"
164145
],
165146
"execution_count": null,
166-
"outputs": [
167-
{
168-
"output_type": "stream",
169-
"text": [
170-
"Total test examples: 10000\n"
171-
],
172-
"name": "stdout"
173-
}
174-
]
147+
"outputs": []
175148
},
176149
{
177150
"cell_type": "markdown",

research/denoised_smoothing/notebooks/Train_Classifier.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"colab_type": "text"
4343
},
4444
"source": [
45-
"<a href=\"https://colab.research.google.com/github/sayakpaul/Denoised-Smoothing-TF/blob/main/Train_Classifier.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
45+
"<a href=\"https://colab.research.google.com/github/sayakpaul/neural-structured-learning/blob/master/research/denoised_smoothing/notebooks/Train_Classifier.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
4646
]
4747
},
4848
{
@@ -58,16 +58,16 @@
5858
"cell_type": "code",
5959
"metadata": {
6060
"id": "4sfls3mIJCsY",
61-
"outputId": "3bf3d897-ec81-49eb-9020-6c197322492a",
6261
"colab": {
6362
"base_uri": "https://localhost:8080/"
64-
}
63+
},
64+
"outputId": "3bf3d897-ec81-49eb-9020-6c197322492a"
6565
},
6666
"source": [
67-
"!git clone https://github.com/sayakpaul/Denoised-Smoothing-TF\n",
68-
"!cd Denoised-Smoothing-TF && tar xf models.tar.gz"
67+
"!git clone https://github.com/sayakpaul/neural-structured-learning\n",
68+
"!cd neural-structured-learning/research/denoised_smoothing && tar xf models.tar.gz"
6969
],
70-
"execution_count": 1,
70+
"execution_count": null,
7171
"outputs": [
7272
{
7373
"output_type": "stream",
@@ -90,7 +90,7 @@
9090
},
9191
"source": [
9292
"import sys\n",
93-
"sys.path.append(\"Denoised-Smoothing-TF\")\n",
93+
"sys.path.append(\"neural-structured-learning/research/denoised_smoothing\")\n",
9494
"\n",
9595
"from models import resnet20\n",
9696
"\n",

research/denoised_smoothing/notebooks/Train_Denoiser.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"colab_type": "text"
4141
},
4242
"source": [
43-
"<a href=\"https://colab.research.google.com/github/sayakpaul/Denoised-Smoothing-TF/blob/main/Train_Denoiser.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
43+
"<a href=\"https://colab.research.google.com/github/sayakpaul/neural-structured-learning/blob/master/research/denoised_smoothing/notebooks/Train_Denoiser.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
4444
]
4545
},
4646
{
@@ -56,16 +56,16 @@
5656
"cell_type": "code",
5757
"metadata": {
5858
"id": "w5c3ETYvNX92",
59-
"outputId": "dbbbf182-65b5-438b-f97e-57d1c7b4eec3",
6059
"colab": {
6160
"base_uri": "https://localhost:8080/"
62-
}
61+
},
62+
"outputId": "dbbbf182-65b5-438b-f97e-57d1c7b4eec3"
6363
},
6464
"source": [
65-
"!git clone https://github.com/sayakpaul/Denoised-Smoothing-TF\n",
66-
"!cd Denoised-Smoothing-TF && tar xf models.tar.gz"
65+
"!git clone https://github.com/sayakpaul/neural-structured-learning\n",
66+
"!cd neural-structured-learning/research/denoised_smoothing && tar xf models.tar.gz"
6767
],
68-
"execution_count": 1,
68+
"execution_count": null,
6969
"outputs": [
7070
{
7171
"output_type": "stream",
@@ -88,7 +88,7 @@
8888
},
8989
"source": [
9090
"import sys\n",
91-
"sys.path.append(\"Denoised-Smoothing-TF\")\n",
91+
"sys.path.append(\"neural-structured-learning/research/denoised_smoothing\")\n",
9292
"\n",
9393
"from models import dncnn\n",
9494
"\n",

0 commit comments

Comments
 (0)