Skip to content

Commit e23d909

Browse files
committed
WIP add one_hot_encoding_batch
1 parent 981449e commit e23d909

15 files changed

+397
-144
lines changed

Ch1 Intro to Deep Learning/001 - sigmoid function.ipynb

+7-5
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
},
7272
"metadata": {
7373
"image/png": {
74-
"height": 255,
75-
"width": 375
74+
"height": 255.0,
75+
"width": 375.0
7676
}
7777
},
7878
"output_type": "display_data"
@@ -109,7 +109,9 @@
109109
"collapsed": true
110110
},
111111
"outputs": [],
112-
"source": []
112+
"source": [
113+
""
114+
]
113115
}
114116
],
115117
"metadata": {
@@ -121,7 +123,7 @@
121123
"language_info": {
122124
"codemirror_mode": {
123125
"name": "ipython",
124-
"version": 3
126+
"version": 3.0
125127
},
126128
"file_extension": ".py",
127129
"mimetype": "text/x-python",
@@ -133,4 +135,4 @@
133135
},
134136
"nbformat": 4,
135137
"nbformat_minor": 0
136-
}
138+
}

Ch1 Intro to Deep Learning/002 - training a single perceptron.ipynb

+14-35
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
},
7474
"metadata": {
7575
"image/png": {
76-
"height": 255,
77-
"width": 375
76+
"height": 255.0,
77+
"width": 375.0
7878
}
7979
},
8080
"output_type": "display_data"
@@ -118,8 +118,8 @@
118118
},
119119
"metadata": {
120120
"image/png": {
121-
"height": 255,
122-
"width": 375
121+
"height": 255.0,
122+
"width": 375.0
123123
}
124124
},
125125
"output_type": "display_data"
@@ -185,8 +185,8 @@
185185
},
186186
"metadata": {
187187
"image/png": {
188-
"height": 265,
189-
"width": 388
188+
"height": 265.0,
189+
"width": 388.0
190190
}
191191
},
192192
"output_type": "display_data"
@@ -228,8 +228,8 @@
228228
},
229229
"metadata": {
230230
"image/png": {
231-
"height": 265,
232-
"width": 381
231+
"height": 265.0,
232+
"width": 381.0
233233
}
234234
},
235235
"output_type": "display_data"
@@ -258,30 +258,7 @@
258258
},
259259
"outputs": [],
260260
"source": [
261-
"\n",
262-
"\n",
263-
"\n",
264-
"\n",
265-
"\n",
266-
"\n",
267-
"\n",
268-
"\n",
269-
"\n",
270-
"\n",
271-
"\n",
272-
"\n",
273-
"\n",
274-
"\n",
275-
"\n",
276-
"\n",
277-
"\n",
278-
"\n",
279-
"\n",
280-
"\n",
281-
"\n",
282-
"\n",
283-
"\n",
284-
"\n"
261+
""
285262
]
286263
},
287264
{
@@ -291,7 +268,9 @@
291268
"collapsed": true
292269
},
293270
"outputs": [],
294-
"source": []
271+
"source": [
272+
""
273+
]
295274
}
296275
],
297276
"metadata": {
@@ -304,7 +283,7 @@
304283
"language_info": {
305284
"codemirror_mode": {
306285
"name": "ipython",
307-
"version": 3
286+
"version": 3.0
308287
},
309288
"file_extension": ".py",
310289
"mimetype": "text/x-python",
@@ -316,4 +295,4 @@
316295
},
317296
"nbformat": 4,
318297
"nbformat_minor": 0
319-
}
298+
}

Ch1 Intro to Deep Learning/003 - use perceptrons to target arbitrary function.ipynb

+18-41
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
},
9595
"metadata": {
9696
"image/png": {
97-
"height": 255,
98-
"width": 377
97+
"height": 255.0,
98+
"width": 377.0
9999
}
100100
},
101101
"output_type": "display_data"
@@ -231,9 +231,7 @@
231231
" def gradient_descent(self, ind, η):\n",
232232
" \"\"\"ind \\in [1, ...len(shape) - 1]\"\"\"\n",
233233
" self.weights[ind] = self.weights[ind] - η * self.partial_ws[ind]\n",
234-
" self.biases[ind] = self.biases[ind] - η * self.δs[ind]\n",
235-
" \n",
236-
"\n"
234+
" self.biases[ind] = self.biases[ind] - η * self.δs[ind]"
237235
]
238236
},
239237
{
@@ -262,8 +260,8 @@
262260
},
263261
"metadata": {
264262
"image/png": {
265-
"height": 255,
266-
"width": 943
263+
"height": 255.0,
264+
"width": 943.0
267265
}
268266
},
269267
"output_type": "display_data"
@@ -308,8 +306,8 @@
308306
},
309307
"metadata": {
310308
"image/png": {
311-
"height": 251,
312-
"width": 911
309+
"height": 251.0,
310+
"width": 911.0
313311
}
314312
},
315313
"output_type": "display_data"
@@ -339,7 +337,7 @@
339337
"# subplot(143)\n",
340338
"# imshow(nw.weights[2], interpolation='none', aspect=1);colorbar()\n",
341339
"# subplot(144)\n",
342-
"# imshow(nw.weights[3], interpolation='none', aspect=1);colorbar()\n"
340+
"# imshow(nw.weights[3], interpolation='none', aspect=1);colorbar()"
343341
]
344342
},
345343
{
@@ -368,8 +366,8 @@
368366
},
369367
"metadata": {
370368
"image/png": {
371-
"height": 255,
372-
"width": 932
369+
"height": 255.0,
370+
"width": 932.0
373371
}
374372
},
375373
"output_type": "display_data"
@@ -428,8 +426,8 @@
428426
},
429427
"metadata": {
430428
"image/png": {
431-
"height": 255,
432-
"width": 933
429+
"height": 255.0,
430+
"width": 933.0
433431
}
434432
},
435433
"output_type": "display_data"
@@ -470,30 +468,7 @@
470468
},
471469
"outputs": [],
472470
"source": [
473-
"\n",
474-
"\n",
475-
"\n",
476-
"\n",
477-
"\n",
478-
"\n",
479-
"\n",
480-
"\n",
481-
"\n",
482-
"\n",
483-
"\n",
484-
"\n",
485-
"\n",
486-
"\n",
487-
"\n",
488-
"\n",
489-
"\n",
490-
"\n",
491-
"\n",
492-
"\n",
493-
"\n",
494-
"\n",
495-
"\n",
496-
"\n"
471+
""
497472
]
498473
},
499474
{
@@ -503,7 +478,9 @@
503478
"collapsed": true
504479
},
505480
"outputs": [],
506-
"source": []
481+
"source": [
482+
""
483+
]
507484
}
508485
],
509486
"metadata": {
@@ -516,7 +493,7 @@
516493
"language_info": {
517494
"codemirror_mode": {
518495
"name": "ipython",
519-
"version": 3
496+
"version": 3.0
520497
},
521498
"file_extension": ".py",
522499
"mimetype": "text/x-python",
@@ -528,4 +505,4 @@
528505
},
529506
"nbformat": 4,
530507
"nbformat_minor": 0
531-
}
508+
}

Ch1 Intro to Deep Learning/004 - optimize batch training.ipynb

+18-39
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
},
100100
"metadata": {
101101
"image/png": {
102-
"height": 255,
103-
"width": 377
102+
"height": 255.0,
103+
"width": 377.0
104104
}
105105
},
106106
"output_type": "display_data"
@@ -317,8 +317,8 @@
317317
},
318318
"metadata": {
319319
"image/png": {
320-
"height": 255,
321-
"width": 925
320+
"height": 255.0,
321+
"width": 925.0
322322
}
323323
},
324324
"output_type": "display_data"
@@ -387,8 +387,8 @@
387387
},
388388
"metadata": {
389389
"image/png": {
390-
"height": 284,
391-
"width": 449
390+
"height": 284.0,
391+
"width": 449.0
392392
}
393393
},
394394
"output_type": "display_data"
@@ -465,8 +465,8 @@
465465
},
466466
"metadata": {
467467
"image/png": {
468-
"height": 265,
469-
"width": 935
468+
"height": 265.0,
469+
"width": 935.0
470470
}
471471
},
472472
"output_type": "display_data"
@@ -553,8 +553,8 @@
553553
},
554554
"metadata": {
555555
"image/png": {
556-
"height": 377,
557-
"width": 377
556+
"height": 377.0,
557+
"width": 377.0
558558
}
559559
},
560560
"output_type": "display_data"
@@ -641,8 +641,8 @@
641641
},
642642
"metadata": {
643643
"image/png": {
644-
"height": 391,
645-
"width": 377
644+
"height": 391.0,
645+
"width": 377.0
646646
}
647647
},
648648
"output_type": "display_data"
@@ -692,30 +692,7 @@
692692
},
693693
"outputs": [],
694694
"source": [
695-
"\n",
696-
"\n",
697-
"\n",
698-
"\n",
699-
"\n",
700-
"\n",
701-
"\n",
702-
"\n",
703-
"\n",
704-
"\n",
705-
"\n",
706-
"\n",
707-
"\n",
708-
"\n",
709-
"\n",
710-
"\n",
711-
"\n",
712-
"\n",
713-
"\n",
714-
"\n",
715-
"\n",
716-
"\n",
717-
"\n",
718-
"\n"
695+
""
719696
]
720697
},
721698
{
@@ -725,7 +702,9 @@
725702
"collapsed": true
726703
},
727704
"outputs": [],
728-
"source": []
705+
"source": [
706+
""
707+
]
729708
}
730709
],
731710
"metadata": {
@@ -738,7 +717,7 @@
738717
"language_info": {
739718
"codemirror_mode": {
740719
"name": "ipython",
741-
"version": 3
720+
"version": 3.0
742721
},
743722
"file_extension": ".py",
744723
"mimetype": "text/x-python",
@@ -750,4 +729,4 @@
750729
},
751730
"nbformat": 4,
752731
"nbformat_minor": 0
753-
}
732+
}

0 commit comments

Comments
 (0)