added video

This commit is contained in:
Morten Hjorth-Jensen
2021-10-08 14:26:53 +02:00
parent 4c2b4a9f57
commit 988c2b7597
8 changed files with 70 additions and 80 deletions
+5
View File
@@ -329,6 +329,11 @@ MathJax.Hub.Config({
</ul>
<li> Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model.</li>
<ul>
<li> <a href="https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage" target="_self">Video of Lecture</a></li>
</ul>
</ul>
Reading suggestions for both days: <a href="https://github.com/CompPhysics/MachineLearning/blob/master/doc/Textbooks/TensorflowML.pdf" target="_self">Aurelien Geron's chapter 10</a> and Hastie et al chapter 11.
+6
View File
@@ -169,6 +169,12 @@ MathJax.Hub.Config({
<p><li> <a href="https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober7.mp4?vrtx=view-as-webpage" target="_blank">Video of Lecture</a></li>
</ul>
<p><li> Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model.</li>
<ul>
<p><li> <a href="https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage" target="_blank">Video of Lecture</a></li>
</ul>
<p>
</ul>
<p>
@@ -278,6 +278,11 @@ MathJax.Hub.Config({
</ul>
<li> Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model.</li>
<ul>
<li> <a href="https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage" target="_blank">Video of Lecture</a></li>
</ul>
</ul>
Reading suggestions for both days: <a href="https://github.com/CompPhysics/MachineLearning/blob/master/doc/Textbooks/TensorflowML.pdf" target="_blank">Aurelien Geron's chapter 10</a> and Hastie et al chapter 11.
+5
View File
@@ -283,6 +283,11 @@ MathJax.Hub.Config({
</ul>
<li> Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model.</li>
<ul>
<li> <a href="https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage" target="_blank">Video of Lecture</a></li>
</ul>
</ul>
Reading suggestions for both days: <a href="https://github.com/CompPhysics/MachineLearning/blob/master/doc/Textbooks/TensorflowML.pdf" target="_blank">Aurelien Geron's chapter 10</a> and Hastie et al chapter 11.
Binary file not shown.
+3
View File
@@ -26,6 +26,9 @@
"\n",
"* Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model. \n",
"\n",
" * [Video of Lecture](https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage)\n",
"\n",
"\n",
"Reading suggestions for both days: [Aurelien Geron's chapter 10](https://github.com/CompPhysics/MachineLearning/blob/master/doc/Textbooks/TensorflowML.pdf) and Hastie et al chapter 11.\n",
"For Stochastic Gradient Descent, we recommend chapter 4 of Geron's text.\n",
"For neural networks we recommend Goodfellow et al chapters 6 and 7 and Bishop 5.1-5.4\n",
+45 -79
View File
@@ -491,9 +491,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
@@ -562,9 +560,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from sklearn.model_selection import train_test_split\n",
@@ -686,9 +682,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# building our neural network\n",
@@ -765,9 +759,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# setup the feed-forward pass, subscript h = hidden layer\n",
@@ -932,9 +924,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# to categorical turns our integer vector into a onehot representation\n",
@@ -1033,9 +1023,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"class NeuralNetwork:\n",
@@ -1157,9 +1145,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"epochs = 100\n",
@@ -1193,9 +1179,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"eta_vals = np.logspace(-5, 1, 7)\n",
@@ -1230,9 +1214,7 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# visual representation of grid search\n",
@@ -1292,9 +1274,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from sklearn.neural_network import MLPClassifier\n",
@@ -1325,9 +1305,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# optional\n",
@@ -1410,9 +1388,7 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"pip3 install tensorflow"
@@ -1429,9 +1405,7 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"conda create -n tf tensorflow\n",
@@ -1448,9 +1422,7 @@
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"conda create -n tf-gpu tensorflow-gpu\n",
@@ -1471,9 +1443,7 @@
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"conda install keras"
@@ -1495,9 +1465,7 @@
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# import necessary packages\n",
@@ -1548,9 +1516,7 @@
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from tensorflow.keras.layers import Input\n",
@@ -1575,9 +1541,7 @@
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"\n",
@@ -1603,9 +1567,7 @@
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"DNN_keras = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)\n",
@@ -1628,9 +1590,7 @@
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# optional\n",
@@ -1676,9 +1636,7 @@
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"\n",
@@ -2398,9 +2356,7 @@
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# import necessary packages\n",
@@ -2455,9 +2411,7 @@
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from tensorflow.keras import datasets, layers, models\n",
@@ -2495,9 +2449,7 @@
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def create_convolutional_neural_network_keras(input_shape, receptive_field,\n",
@@ -2538,9 +2490,7 @@
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"CNN_keras = np.zeros((len(eta_vals), len(lmbd_vals)), dtype=object)\n",
@@ -2571,9 +2521,7 @@
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# visual representation of grid search\n",
@@ -2620,7 +2568,25 @@
]
}
],
"metadata": {},
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+1 -1
View File
@@ -9,7 +9,7 @@ DATE: today
* Thursday: Stochastic Gradient descent with examples and automatic differentiation and begin Neural Networks.
* "Video of Lecture":"https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober7.mp4?vrtx=view-as-webpage"
* Friday: Neural Networks, setting up the basic steps, from the simple perceptron model to the multi-layer perceptron model.
* "Video of Lecture":"https://www.uio.no/studier/emner/matnat/fys/FYS-STK3155/h21/forelesningsvideoer/LectureOctober8.mp4?vrtx=view-as-webpage"
Reading suggestions for both days: "Aurelien Geron's chapter 10":"https://github.com/CompPhysics/MachineLearning/blob/master/doc/Textbooks/TensorflowML.pdf" and Hastie et al chapter 11.
For Stochastic Gradient Descent, we recommend chapter 4 of Geron's text.
For neural networks we recommend Goodfellow et al chapters 6 and 7 and Bishop 5.1-5.4