Skip to content

Commit 1880182

Browse files
yashk2810copybara-github
authored andcommitted
Fix via nbfmt
PiperOrigin-RevId: 330639253
1 parent baa4dc7 commit 1880182

File tree

52 files changed

+1409
-4876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1409
-4876
lines changed

courses/udacity_deep_learning/1_notmnist.ipynb

+148-327
Large diffs are not rendered by default.

courses/udacity_deep_learning/2_fullyconnected.ipynb

+127-272
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
11
{
2-
"nbformat": 4,
3-
"nbformat_minor": 0,
4-
"metadata": {
5-
"colab": {
6-
"version": "0.3.2",
7-
"views": {},
8-
"default_view": {},
9-
"name": "3_regularization.ipynb",
10-
"provenance": [],
11-
"toc_visible": true
12-
}
13-
},
142
"cells": [
153
{
164
"cell_type": "markdown",
175
"metadata": {
18-
"id": "kR-4eNdK6lYS",
19-
"colab_type": "text"
6+
"id": "kR-4eNdK6lYS"
207
},
218
"source": [
229
"Deep Learning\n",
@@ -32,73 +19,48 @@
3219
},
3320
{
3421
"cell_type": "code",
22+
"execution_count": null,
3523
"metadata": {
36-
"id": "JLpLa8Jt7Vu4",
37-
"colab_type": "code",
38-
"colab": {
39-
"autoexec": {
40-
"startup": false,
41-
"wait_interval": 0
42-
}
43-
},
44-
"cellView": "both"
24+
"cellView": "both",
25+
"id": "JLpLa8Jt7Vu4"
4526
},
27+
"outputs": [],
4628
"source": [
4729
"# These are all the modules we'll be using later. Make sure you can import them\n",
4830
"# before proceeding further.\n",
4931
"from __future__ import print_function\n",
5032
"import numpy as np\n",
5133
"import tensorflow as tf\n",
5234
"from six.moves import cPickle as pickle"
53-
],
54-
"outputs": [],
55-
"execution_count": 0
35+
]
5636
},
5737
{
5838
"cell_type": "markdown",
5939
"metadata": {
60-
"id": "1HrCK6e17WzV",
61-
"colab_type": "text"
40+
"id": "1HrCK6e17WzV"
6241
},
6342
"source": [
6443
"First reload the data we generated in `1_notmnist.ipynb`."
6544
]
6645
},
6746
{
6847
"cell_type": "code",
48+
"execution_count": null,
6949
"metadata": {
70-
"id": "y3-cj1bpmuxc",
71-
"colab_type": "code",
72-
"colab": {
73-
"autoexec": {
74-
"startup": false,
75-
"wait_interval": 0
76-
},
77-
"output_extras": [
78-
{
79-
"item_id": 1
80-
}
81-
]
82-
},
8350
"cellView": "both",
84-
"executionInfo": {
85-
"elapsed": 11777,
86-
"status": "ok",
87-
"timestamp": 1449849322348,
88-
"user": {
89-
"color": "",
90-
"displayName": "",
91-
"isAnonymous": false,
92-
"isMe": true,
93-
"permissionId": "",
94-
"photoUrl": "",
95-
"sessionId": "0",
96-
"userId": ""
97-
},
98-
"user_tz": 480
99-
},
100-
"outputId": "e03576f1-ebbe-4838-c388-f1777bcc9873"
51+
"id": "y3-cj1bpmuxc"
10152
},
53+
"outputs": [
54+
{
55+
"name": "stdout",
56+
"output_type": "stream",
57+
"text": [
58+
"Training set (200000, 28, 28) (200000,)\n",
59+
"Validation set (10000, 28, 28) (10000,)\n",
60+
"Test set (18724, 28, 28) (18724,)\n"
61+
]
62+
}
63+
],
10264
"source": [
10365
"pickle_file = 'notMNIST.pickle'\n",
10466
"\n",
@@ -114,25 +76,12 @@
11476
" print('Training set', train_dataset.shape, train_labels.shape)\n",
11577
" print('Validation set', valid_dataset.shape, valid_labels.shape)\n",
11678
" print('Test set', test_dataset.shape, test_labels.shape)"
117-
],
118-
"outputs": [
119-
{
120-
"output_type": "stream",
121-
"text": [
122-
"Training set (200000, 28, 28) (200000,)\n",
123-
"Validation set (10000, 28, 28) (10000,)\n",
124-
"Test set (18724, 28, 28) (18724,)\n"
125-
],
126-
"name": "stdout"
127-
}
128-
],
129-
"execution_count": 0
79+
]
13080
},
13181
{
13282
"cell_type": "markdown",
13383
"metadata": {
134-
"id": "L7aHrm6nGDMB",
135-
"colab_type": "text"
84+
"id": "L7aHrm6nGDMB"
13685
},
13786
"source": [
13887
"Reformat into a shape that's more adapted to the models we're going to train:\n",
@@ -142,39 +91,22 @@
14291
},
14392
{
14493
"cell_type": "code",
94+
"execution_count": null,
14595
"metadata": {
146-
"id": "IRSyYiIIGIzS",
147-
"colab_type": "code",
148-
"colab": {
149-
"autoexec": {
150-
"startup": false,
151-
"wait_interval": 0
152-
},
153-
"output_extras": [
154-
{
155-
"item_id": 1
156-
}
157-
]
158-
},
15996
"cellView": "both",
160-
"executionInfo": {
161-
"elapsed": 11728,
162-
"status": "ok",
163-
"timestamp": 1449849322356,
164-
"user": {
165-
"color": "",
166-
"displayName": "",
167-
"isAnonymous": false,
168-
"isMe": true,
169-
"permissionId": "",
170-
"photoUrl": "",
171-
"sessionId": "0",
172-
"userId": ""
173-
},
174-
"user_tz": 480
175-
},
176-
"outputId": "3f8996ee-3574-4f44-c953-5c8a04636582"
97+
"id": "IRSyYiIIGIzS"
17798
},
99+
"outputs": [
100+
{
101+
"name": "stdout",
102+
"output_type": "stream",
103+
"text": [
104+
"Training set (200000, 784) (200000, 10)\n",
105+
"Validation set (10000, 784) (10000, 10)\n",
106+
"Test set (18724, 784) (18724, 10)\n"
107+
]
108+
}
109+
],
178110
"source": [
179111
"image_size = 28\n",
180112
"num_labels = 10\n",
@@ -190,46 +122,26 @@
190122
"print('Training set', train_dataset.shape, train_labels.shape)\n",
191123
"print('Validation set', valid_dataset.shape, valid_labels.shape)\n",
192124
"print('Test set', test_dataset.shape, test_labels.shape)"
193-
],
194-
"outputs": [
195-
{
196-
"output_type": "stream",
197-
"text": [
198-
"Training set (200000, 784) (200000, 10)\n",
199-
"Validation set (10000, 784) (10000, 10)\n",
200-
"Test set (18724, 784) (18724, 10)\n"
201-
],
202-
"name": "stdout"
203-
}
204-
],
205-
"execution_count": 0
125+
]
206126
},
207127
{
208128
"cell_type": "code",
129+
"execution_count": null,
209130
"metadata": {
210-
"id": "RajPLaL_ZW6w",
211-
"colab_type": "code",
212-
"colab": {
213-
"autoexec": {
214-
"startup": false,
215-
"wait_interval": 0
216-
}
217-
},
218-
"cellView": "both"
131+
"cellView": "both",
132+
"id": "RajPLaL_ZW6w"
219133
},
134+
"outputs": [],
220135
"source": [
221136
"def accuracy(predictions, labels):\n",
222137
" return (100.0 * np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1))\n",
223138
" / predictions.shape[0])"
224-
],
225-
"outputs": [],
226-
"execution_count": 0
139+
]
227140
},
228141
{
229142
"cell_type": "markdown",
230143
"metadata": {
231-
"id": "sgLbUAQ1CW-1",
232-
"colab_type": "text"
144+
"id": "sgLbUAQ1CW-1"
233145
},
234146
"source": [
235147
"---\n",
@@ -244,8 +156,7 @@
244156
{
245157
"cell_type": "markdown",
246158
"metadata": {
247-
"id": "na8xX2yHZzNF",
248-
"colab_type": "text"
159+
"id": "na8xX2yHZzNF"
249160
},
250161
"source": [
251162
"---\n",
@@ -259,8 +170,7 @@
259170
{
260171
"cell_type": "markdown",
261172
"metadata": {
262-
"id": "ww3SCBUdlkRc",
263-
"colab_type": "text"
173+
"id": "ww3SCBUdlkRc"
264174
},
265175
"source": [
266176
"---\n",
@@ -276,8 +186,7 @@
276186
{
277187
"cell_type": "markdown",
278188
"metadata": {
279-
"id": "-b1hTz3VWZjw",
280-
"colab_type": "text"
189+
"id": "-b1hTz3VWZjw"
281190
},
282191
"source": [
283192
"---\n",
@@ -297,5 +206,17 @@
297206
" ---\n"
298207
]
299208
}
300-
]
209+
],
210+
"metadata": {
211+
"colab": {
212+
"name": "3_regularization.ipynb",
213+
"toc_visible": true
214+
},
215+
"kernelspec": {
216+
"display_name": "Python 3",
217+
"name": "python3"
218+
}
219+
},
220+
"nbformat": 4,
221+
"nbformat_minor": 0
301222
}

0 commit comments

Comments
 (0)