|
41 | 41 | "colab_type": "text" |
42 | 42 | }, |
43 | 43 | "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>" |
45 | 45 | ] |
46 | 46 | }, |
47 | 47 | { |
|
70 | 70 | "id": "FDlxwScPHSW_" |
71 | 71 | }, |
72 | 72 | "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" |
75 | 75 | ], |
76 | 76 | "execution_count": null, |
77 | 77 | "outputs": [] |
|
83 | 83 | }, |
84 | 84 | "source": [ |
85 | 85 | "import sys\n", |
86 | | - "sys.path.append(\"Denoised-Smoothing-TF\")\n", |
| 86 | + "sys.path.append(\"neural-structured-learning/research/denoised_smoothing\")\n", |
87 | 87 | "\n", |
88 | 88 | "from scripts import certify, analyze\n", |
89 | 89 | "import matplotlib.pyplot as plt\n", |
|
108 | 108 | { |
109 | 109 | "cell_type": "code", |
110 | 110 | "metadata": { |
111 | | - "colab": { |
112 | | - "base_uri": "https://localhost:8080/" |
113 | | - }, |
114 | | - "id": "Dzhq0lXNHssc", |
115 | | - "outputId": "2b184ca9-4c2b-4df0-8a2f-b00a407b75d4" |
| 111 | + "id": "Dzhq0lXNHssc" |
116 | 112 | }, |
117 | 113 | "source": [ |
118 | 114 | "print(\"Loading models.\")\n", |
|
122 | 118 | "print(\"Models loaded.\")" |
123 | 119 | ], |
124 | 120 | "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": [] |
137 | 122 | }, |
138 | 123 | { |
139 | 124 | "cell_type": "markdown", |
|
147 | 132 | { |
148 | 133 | "cell_type": "code", |
149 | 134 | "metadata": { |
150 | | - "colab": { |
151 | | - "base_uri": "https://localhost:8080/" |
152 | | - }, |
153 | | - "id": "flIat9vpJqpl", |
154 | | - "outputId": "ba351f95-acfd-4b0f-e757-08881c1a7890" |
| 135 | + "id": "flIat9vpJqpl" |
155 | 136 | }, |
156 | 137 | "source": [ |
157 | 138 | "(x_train, _), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()\n", |
|
163 | 144 | "norm_layer.adapt(x_train/255.0) # Notice the scaling step" |
164 | 145 | ], |
165 | 146 | "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": [] |
175 | 148 | }, |
176 | 149 | { |
177 | 150 | "cell_type": "markdown", |
|
0 commit comments