From ba48ed5f53b55b4da106eb8b6b0fed7ccc3653b2 Mon Sep 17 00:00:00 2001 From: mhjensen Date: Sun, 11 Oct 2020 23:07:09 +0200 Subject: [PATCH] updating week42 --- doc/pub/week42/html/._week42-bs000.html | 40 ++-- doc/pub/week42/html/._week42-bs001.html | 38 ++-- doc/pub/week42/html/._week42-bs002.html | 38 ++-- doc/pub/week42/html/._week42-bs003.html | 38 ++-- doc/pub/week42/html/._week42-bs004.html | 38 ++-- doc/pub/week42/html/._week42-bs005.html | 38 ++-- doc/pub/week42/html/._week42-bs006.html | 38 ++-- doc/pub/week42/html/._week42-bs007.html | 38 ++-- doc/pub/week42/html/._week42-bs008.html | 38 ++-- doc/pub/week42/html/._week42-bs009.html | 38 ++-- doc/pub/week42/html/._week42-bs010.html | 38 ++-- doc/pub/week42/html/._week42-bs011.html | 38 ++-- doc/pub/week42/html/._week42-bs012.html | 38 ++-- doc/pub/week42/html/._week42-bs013.html | 38 ++-- doc/pub/week42/html/._week42-bs014.html | 38 ++-- doc/pub/week42/html/._week42-bs015.html | 38 ++-- doc/pub/week42/html/._week42-bs016.html | 39 ++-- doc/pub/week42/html/._week42-bs017.html | 40 ++-- doc/pub/week42/html/._week42-bs018.html | 41 ++-- doc/pub/week42/html/._week42-bs019.html | 74 +++++--- doc/pub/week42/html/._week42-bs020.html | 71 ++++--- doc/pub/week42/html/._week42-bs021.html | 70 +++++-- doc/pub/week42/html/._week42-bs022.html | 65 +++++-- doc/pub/week42/html/._week42-bs023.html | 77 ++++---- doc/pub/week42/html/._week42-bs024.html | 58 ++++-- doc/pub/week42/html/week42-bs.html | 40 ++-- doc/pub/week42/html/week42-reveal.html | 161 +++++++++++++++- doc/pub/week42/html/week42-solarized.html | 175 +++++++++++++++-- doc/pub/week42/html/week42.html | 175 +++++++++++++++-- doc/pub/week42/ipynb/ipynb-week42-src.tar.gz | Bin 87344 -> 87344 bytes doc/pub/week42/ipynb/week42.ipynb | 187 ++++++++++++++++++- doc/src/week42/week42.do.txt | 123 ++++++++++++ 32 files changed, 1579 insertions(+), 427 deletions(-) diff --git a/doc/pub/week42/html/._week42-bs000.html b/doc/pub/week42/html/._week42-bs000.html index d64a83fdf..13a511a78 100644 --- a/doc/pub/week42/html/._week42-bs000.html +++ b/doc/pub/week42/html/._week42-bs000.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -180,7 +192,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 10, 2020

    +

    Oct 11, 2020


    @@ -204,7 +216,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs001.html b/doc/pub/week42/html/._week42-bs001.html index dc04b8da5..8dfa96760 100644 --- a/doc/pub/week42/html/._week42-bs001.html +++ b/doc/pub/week42/html/._week42-bs001.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -188,7 +200,7 @@ extbooks/TensorflowML.pdf" target="_self">Aurelien Geron's chapters 13 and 1410
  • 11
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs002.html b/doc/pub/week42/html/._week42-bs002.html index f43b213b6..423e7e1a7 100644 --- a/doc/pub/week42/html/._week42-bs002.html +++ b/doc/pub/week42/html/._week42-bs002.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -215,7 +227,7 @@ Another good read is the article here 11
  • 12
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs003.html b/doc/pub/week42/html/._week42-bs003.html index dd248b28f..53f2c073f 100644 --- a/doc/pub/week42/html/._week42-bs003.html +++ b/doc/pub/week42/html/._week42-bs003.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -205,7 +217,7 @@ would quickly lead to possible overfitting.
  • 12
  • 13
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs004.html b/doc/pub/week42/html/._week42-bs004.html index 8b147aca6..e76c60260 100644 --- a/doc/pub/week42/html/._week42-bs004.html +++ b/doc/pub/week42/html/._week42-bs004.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -218,7 +230,7 @@ dimension.
  • 13
  • 14
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs005.html b/doc/pub/week42/html/._week42-bs005.html index a5c18c74a..3b3e87c46 100644 --- a/doc/pub/week42/html/._week42-bs005.html +++ b/doc/pub/week42/html/._week42-bs005.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -202,7 +214,7 @@ A simple CNN for image classification could have the architecture:
  • 14
  • 15
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs006.html b/doc/pub/week42/html/._week42-bs006.html index 18f9a7a61..657e16140 100644 --- a/doc/pub/week42/html/._week42-bs006.html +++ b/doc/pub/week42/html/._week42-bs006.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -199,7 +211,7 @@ are consistent with the labels in the training set for each image.
  • 15
  • 16
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs007.html b/doc/pub/week42/html/._week42-bs007.html index 8d0486581..a113d44e8 100644 --- a/doc/pub/week42/html/._week42-bs007.html +++ b/doc/pub/week42/html/._week42-bs007.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -202,7 +214,7 @@ and the slides of 16
  • 17
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs008.html b/doc/pub/week42/html/._week42-bs008.html index 41b6bf554..a5f50809a 100644 --- a/doc/pub/week42/html/._week42-bs008.html +++ b/doc/pub/week42/html/._week42-bs008.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -198,7 +210,7 @@ matrices, typically 1 for each color dimension (Red, Green, Blue).
  • 17
  • 18
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs009.html b/doc/pub/week42/html/._week42-bs009.html index a81390f5d..bb82a2dd8 100644 --- a/doc/pub/week42/html/._week42-bs009.html +++ b/doc/pub/week42/html/._week42-bs009.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -195,7 +207,7 @@ $$
  • 18
  • 19
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs010.html b/doc/pub/week42/html/._week42-bs010.html index e06a1db4a..686400fe1 100644 --- a/doc/pub/week42/html/._week42-bs010.html +++ b/doc/pub/week42/html/._week42-bs010.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -202,7 +214,7 @@ single neuron in the first hidden layer.
  • 19
  • 20
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs011.html b/doc/pub/week42/html/._week42-bs011.html index f3c6f94db..bf5d4c2ca 100644 --- a/doc/pub/week42/html/._week42-bs011.html +++ b/doc/pub/week42/html/._week42-bs011.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -202,7 +214,7 @@ fixed, and known as a 20
  • 21
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs012.html b/doc/pub/week42/html/._week42-bs012.html index 27b1e5896..889f09fc3 100644 --- a/doc/pub/week42/html/._week42-bs012.html +++ b/doc/pub/week42/html/._week42-bs012.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -206,7 +218,7 @@ layer.
  • 21
  • 22
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs013.html b/doc/pub/week42/html/._week42-bs013.html index 0d3ae6d16..6ccb6d26d 100644 --- a/doc/pub/week42/html/._week42-bs013.html +++ b/doc/pub/week42/html/._week42-bs013.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -199,7 +211,7 @@ classification.
  • 22
  • 23
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs014.html b/doc/pub/week42/html/._week42-bs014.html index 061a34475..20afc3d49 100644 --- a/doc/pub/week42/html/._week42-bs014.html +++ b/doc/pub/week42/html/._week42-bs014.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -232,7 +244,7 @@ plt.show()
  • 23
  • 24
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs015.html b/doc/pub/week42/html/._week42-bs015.html index d7c8d9943..50a175473 100644 --- a/doc/pub/week42/html/._week42-bs015.html +++ b/doc/pub/week42/html/._week42-bs015.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -213,6 +225,8 @@ X_train, X_test, Y_train, Y_test = train_tes
  • 23
  • 24
  • 25
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs016.html b/doc/pub/week42/html/._week42-bs016.html index dfec01b28..aa4a423a6 100644 --- a/doc/pub/week42/html/._week42-bs016.html +++ b/doc/pub/week42/html/._week42-bs016.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -217,6 +229,9 @@ lmbd_vals = np.
  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs017.html b/doc/pub/week42/html/._week42-bs017.html index b0a93025f..a1c375e73 100644 --- a/doc/pub/week42/html/._week42-bs017.html +++ b/doc/pub/week42/html/._week42-bs017.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -206,6 +218,10 @@ MathJax.Hub.Config({
  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs018.html b/doc/pub/week42/html/._week42-bs018.html index fd562927a..4b8a3425f 100644 --- a/doc/pub/week42/html/._week42-bs018.html +++ b/doc/pub/week42/html/._week42-bs018.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -219,6 +231,11 @@ plt.show()
  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs019.html b/doc/pub/week42/html/._week42-bs019.html index 8fdfb544c..8be427815 100644 --- a/doc/pub/week42/html/._week42-bs019.html +++ b/doc/pub/week42/html/._week42-bs019.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,28 +173,28 @@ MathJax.Hub.Config({ -

    Recurrent neural networks: Overarching view

    +

    The CIFAR01 data set

    -Till now our focus has been, including convolutional neural networks -as well, on feedforward neural networks. The output or the activations -flow only in one direction, from the input layer to the output layer. +The CIFAR10 dataset contains 60,000 color images in 10 classes, with +6,000 images in each class. The dataset is divided into 50,000 +training images and 10,000 testing images. The classes are mutually +exclusive and there is no overlap between them.

    -A recurrent neural network (RNN) looks very much like a feedforward -neural network, except that it also has connections pointing -backward. -

    -RNNs are used to analyze time series data such as stock prices, and -tell you when to buy or sell. In autonomous driving systems, they can -anticipate car trajectories and help avoid accidents. More generally, -they can work on sequences of arbitrary lengths, rather than on -fixed-sized inputs like all the nets we have discussed so far. For -example, they can take sentences, documents, or audio samples as -input, making them extremely useful for natural language processing -systems such as automatic translation and speech-to-text. + +

    import tensorflow as tf
     
    +from tensorflow.keras import datasets, layers, models
    +import matplotlib.pyplot as plt
    +
    +# We import the data set
    +(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
    +
    +# Normalize pixel values to be between 0 and 1 by dividing by 255. 
    +train_images, test_images = train_images / 255.0, test_images / 255.0
    +

    @@ -204,6 +216,12 @@ systems such as automatic translation and speech-to-text.

  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • 29
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs020.html b/doc/pub/week42/html/._week42-bs020.html index ed1225536..04300720f 100644 --- a/doc/pub/week42/html/._week42-bs020.html +++ b/doc/pub/week42/html/._week42-bs020.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,21 +173,29 @@ MathJax.Hub.Config({ -

    Set up of an RNN

    +

    Verifying the data set

    -The figure here displays a simple example of an RNN, with inputs \( x_t \) -at a given time \( t \) and outputs \( y_t \). Introducing time as a variable -offers an intutitive way of understanding these networks. In addition -to the inputs \( x_t \), the layer at a time \( t \) receives also as input -the output from the previous layer \( t-1 \), that is \( y_{t1} \). +To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image.

    -This means also that we need to have weights that link both the inputs -\( x_t \) to the outputs \( y_t \) as well as weights that link the output -from the previous time \( y_{t-1} \) and \( y_t \). The figure here shows an -example of a simple RNN. + +

    class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
    +               'dog', 'frog', 'horse', 'ship', 'truck']
    +​
    +plt.figure(figsize=(10,10))
    +for i in range(25):
    +    plt.subplot(5,5,i+1)
    +    plt.xticks([])
    +    plt.yticks([])
    +    plt.grid(False)
    +    plt.imshow(train_images[i], cmap=plt.cm.binary)
    +    # The CIFAR labels happen to be arrays, 
    +    # which is why you need the extra index
    +    plt.xlabel(class_names[train_labels[i][0]])
    +plt.show()
    +

    @@ -196,6 +216,13 @@ example of a simple RNN.

  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • 29
  • +
  • 30
  • +
  • ...
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs021.html b/doc/pub/week42/html/._week42-bs021.html index d66827982..35bf76957 100644 --- a/doc/pub/week42/html/._week42-bs021.html +++ b/doc/pub/week42/html/._week42-bs021.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,18 +173,30 @@ MathJax.Hub.Config({ -

    Solving differential equations and eigenvalue problems with RNNs

    +

    Set up the model

    -In our discussions of ordinary differential equations and partial -differential equations using neural networks. Here we will discuss how -we can solve say ordinary differential equations and eigenvalue -problems using RNNs. Eigenvalue problems can be solved using RNNs by -rewriting such a problems as a non-linear differential equation. +The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers.

    -Instead of starting with a well-known ordinary differential equation, -we start directly with an eigenvaule problem. +As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer. + +

    + + +

    model = models.Sequential()
    +model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +
    +# Let's display the architecture of our model so far.
    +
    +model.summary()
    +
    +

    +You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer.

    @@ -193,6 +217,12 @@ we start directly with an eigenvaule problem.

  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • 29
  • +
  • 30
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs022.html b/doc/pub/week42/html/._week42-bs022.html index b9642e0f8..c7fd6aa04 100644 --- a/doc/pub/week42/html/._week42-bs022.html +++ b/doc/pub/week42/html/._week42-bs022.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,10 +173,29 @@ MathJax.Hub.Config({ -

    Long-Short Time Memory

    +

    Add Dense layers on top

    -Discussions about dynamic unrolling through time. discuss memory cells, input and output +To complete our model, you will feed the last output tensor from the +convolutional base (of shape (4, 4, 64)) into one or more Dense layers +to perform classification. Dense layers take vectors as input (which +are 1D), while the current output is a 3D tensor. First, you will +flatten (or unroll) the 3D output to 1D, then add one or more Dense +layers on top. CIFAR has 10 output classes, so you use a final Dense +layer with 10 outputs and a softmax activation. + +

    + + +

    model.add(layers.Flatten())
    +model.add(layers.Dense(64, activation='relu'))
    +model.add(layers.Dense(10))
    +Here's the complete architecture of our model.
    +
    +model.summary()
    +
    +

    +As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers.

    @@ -184,6 +215,12 @@ Discussions about dynamic unrolling through time. discuss memory cells, input an

  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • 29
  • +
  • 30
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs023.html b/doc/pub/week42/html/._week42-bs023.html index 589adfa06..7574d65dc 100644 --- a/doc/pub/week42/html/._week42-bs023.html +++ b/doc/pub/week42/html/._week42-bs023.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,35 +173,18 @@ MathJax.Hub.Config({ -

    Autoencoders: Overarching view

    +

    Compile and train the model

    -Autoencoders are artificial neural networks capable of learning -efficient representations of the input data (these representations are called codings) without -any supervision (i.e., the training set is unlabeled). These codings -typically have a much lower dimensionality than the input data, making -autoencoders useful for dimensionality reduction. - -

    -More importantly, autoencoders act as powerful feature detectors, and -they can be used for unsupervised pretraining of deep neural networks. - -

    -Lastly, they are capable of randomly generating new data that looks -very similar to the training data; this is called a generative -model. For example, you could train an autoencoder on pictures of -faces, and it would then be able to generate new faces. Surprisingly, -autoencoders work by simply learning to copy their inputs to their -outputs. This may sound like a trivial task, but we will see that -constraining the network in various ways can make it rather -difficult. For example, you can limit the size of the internal -representation, or you can add noise to the inputs and train the -network to recover the original inputs. These constraints prevent the -autoencoder from trivially copying the inputs directly to the outputs, -which forces it to learn efficient ways of representing the data. In -short, the codings are byproducts of the autoencoder’s attempt to -learn the identity function under some constraints. + +

    model.compile(optimizer='adam',
    +              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    +              metrics=['accuracy'])
    +​
    +history = model.fit(train_images, train_labels, epochs=10, 
    +                    validation_data=(test_images, test_labels))
    +

    @@ -207,6 +202,12 @@ learn the identity function under some constraints.

  • 23
  • 24
  • 25
  • +
  • 26
  • +
  • 27
  • +
  • 28
  • +
  • 29
  • +
  • 30
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/._week42-bs024.html b/doc/pub/week42/html/._week42-bs024.html index e4e5ca22e..fb0243964 100644 --- a/doc/pub/week42/html/._week42-bs024.html +++ b/doc/pub/week42/html/._week42-bs024.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -161,10 +173,23 @@ MathJax.Hub.Config({ -

    Simple examples of Autoencoders

    +

    Finally, evaluate the model

    + +

    plt.plot(history.history['accuracy'], label='accuracy')
    +plt.plot(history.history['val_accuracy'], label = 'val_accuracy')
    +plt.xlabel('Epoch')
    +plt.ylabel('Accuracy')
    +plt.ylim([0.5, 1])
    +plt.legend(loc='lower right')
    +
    +test_loss, test_acc = model.evaluate(test_images,  test_labels, verbose=2)
    +
    +print(test_acc)
    +
    +

    diff --git a/doc/pub/week42/html/week42-bs.html b/doc/pub/week42/html/week42-bs.html index d64a83fdf..13a511a78 100644 --- a/doc/pub/week42/html/week42-bs.html +++ b/doc/pub/week42/html/week42-bs.html @@ -72,19 +72,25 @@ Automatically generated HTML file from DocOnce source ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -140,12 +146,18 @@ MathJax.Hub.Config({
  • Running with Keras
  • Final part
  • Final visualization
  • -
  • Recurrent neural networks: Overarching view
  • -
  • Set up of an RNN
  • -
  • Solving differential equations and eigenvalue problems with RNNs
  • -
  • Long-Short Time Memory
  • -
  • Autoencoders: Overarching view
  • -
  • Simple examples of Autoencoders
  • +
  • The CIFAR01 data set
  • +
  • Verifying the data set
  • +
  • Set up the model
  • +
  • Add Dense layers on top
  • +
  • Compile and train the model
  • +
  • Finally, evaluate the model
  • +
  • Recurrent neural networks: Overarching view
  • +
  • Set up of an RNN
  • +
  • Solving differential equations and eigenvalue problems with RNNs
  • +
  • Long-Short Time Memory
  • +
  • Autoencoders: Overarching view
  • +
  • Simple examples of Autoencoders
  • @@ -180,7 +192,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 10, 2020

    +

    Oct 11, 2020


    @@ -204,7 +216,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 25
  • +
  • 31
  • »
  • diff --git a/doc/pub/week42/html/week42-reveal.html b/doc/pub/week42/html/week42-reveal.html index d23d7a5d2..a6315472d 100644 --- a/doc/pub/week42/html/week42-reveal.html +++ b/doc/pub/week42/html/week42-reveal.html @@ -148,7 +148,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    Oct 10, 2020

    +

    Oct 11, 2020


    @@ -631,7 +631,151 @@ plt.show()

    -

    Recurrent neural networks: Overarching view

    +

    The CIFAR01 data set

    + +

    +The CIFAR10 dataset contains 60,000 color images in 10 classes, with +6,000 images in each class. The dataset is divided into 50,000 +training images and 10,000 testing images. The classes are mutually +exclusive and there is no overlap between them. + +

    + + +

    import tensorflow as tf
    +
    +from tensorflow.keras import datasets, layers, models
    +import matplotlib.pyplot as plt
    +
    +# We import the data set
    +(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
    +
    +# Normalize pixel values to be between 0 and 1 by dividing by 255. 
    +train_images, test_images = train_images / 255.0, test_images / 255.0
    +
    +
    + + +
    +

    Verifying the data set

    + +

    +To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image. + +

    + + +

    class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
    +               'dog', 'frog', 'horse', 'ship', 'truck']
    +
    +plt.figure(figsize=(10,10))
    +for i in range(25):
    +    plt.subplot(5,5,i+1)
    +    plt.xticks([])
    +    plt.yticks([])
    +    plt.grid(False)
    +    plt.imshow(train_images[i], cmap=plt.cm.binary)
    +    # The CIFAR labels happen to be arrays, 
    +    # which is why you need the extra index
    +    plt.xlabel(class_names[train_labels[i][0]])
    +plt.show()
    +
    +
    + + +
    +

    Set up the model

    + +

    +The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers. + +

    +As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer. + +

    + + +

    model = models.Sequential()
    +model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +
    +# Let's display the architecture of our model so far.
    +
    +model.summary()
    +
    +

    +You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer. +

    + + +
    +

    Add Dense layers on top

    + +

    +To complete our model, you will feed the last output tensor from the +convolutional base (of shape (4, 4, 64)) into one or more Dense layers +to perform classification. Dense layers take vectors as input (which +are 1D), while the current output is a 3D tensor. First, you will +flatten (or unroll) the 3D output to 1D, then add one or more Dense +layers on top. CIFAR has 10 output classes, so you use a final Dense +layer with 10 outputs and a softmax activation. + +

    + + +

    model.add(layers.Flatten())
    +model.add(layers.Dense(64, activation='relu'))
    +model.add(layers.Dense(10))
    +Here's the complete architecture of our model.
    +
    +model.summary()
    +
    +

    +As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers. +

    + + +
    +

    Compile and train the model

    + +

    + + +

    model.compile(optimizer='adam',
    +              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    +              metrics=['accuracy'])
    +
    +history = model.fit(train_images, train_labels, epochs=10, 
    +                    validation_data=(test_images, test_labels))
    +
    +
    + + +
    +

    Finally, evaluate the model

    + +

    + + +

    plt.plot(history.history['accuracy'], label='accuracy')
    +plt.plot(history.history['val_accuracy'], label = 'val_accuracy')
    +plt.xlabel('Epoch')
    +plt.ylabel('Accuracy')
    +plt.ylim([0.5, 1])
    +plt.legend(loc='lower right')
    +
    +test_loss, test_acc = model.evaluate(test_images,  test_labels, verbose=2)
    +
    +print(test_acc)
    +
    +
    + + +
    +

    Recurrent neural networks: Overarching view

    Till now our focus has been, including convolutional neural networks @@ -656,7 +800,7 @@ systems such as automatic translation and speech-to-text.

    -

    Set up of an RNN

    +

    Set up of an RNN

    The figure here displays a simple example of an RNN, with inputs \( x_t \) @@ -670,11 +814,14 @@ This means also that we need to have weights that link both the inputs \( x_t \) to the outputs \( y_t \) as well as weights that link the output from the previous time \( y_{t-1} \) and \( y_t \). The figure here shows an example of a simple RNN. + +

    +More material will be added here.

    -

    Solving differential equations and eigenvalue problems with RNNs

    +

    Solving differential equations and eigenvalue problems with RNNs

    In our discussions of ordinary differential equations and partial @@ -690,7 +837,7 @@ we start directly with an eigenvaule problem.

    -

    Long-Short Time Memory

    +

    Long-Short Time Memory

    Discussions about dynamic unrolling through time. discuss memory cells, input and output @@ -698,7 +845,7 @@ Discussions about dynamic unrolling through time. discuss memory cells, input an

    -

    Autoencoders: Overarching view

    +

    Autoencoders: Overarching view

    Autoencoders are artificial neural networks capable of learning @@ -730,7 +877,7 @@ learn the identity function under some constraints.

    -

    Simple examples of Autoencoders

    +

    Simple examples of Autoencoders

    diff --git a/doc/pub/week42/html/week42-solarized.html b/doc/pub/week42/html/week42-solarized.html index 7ec9bdf0a..e28a1ebe8 100644 --- a/doc/pub/week42/html/week42-solarized.html +++ b/doc/pub/week42/html/week42-solarized.html @@ -66,19 +66,25 @@ div { text-align: justify; text-justify: inter-word; } ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -120,7 +126,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 10, 2020

    +

    Oct 11, 2020












    @@ -586,7 +592,147 @@ plt.show()











    -

    Recurrent neural networks: Overarching view

    +

    The CIFAR01 data set

    + +

    +The CIFAR10 dataset contains 60,000 color images in 10 classes, with +6,000 images in each class. The dataset is divided into 50,000 +training images and 10,000 testing images. The classes are mutually +exclusive and there is no overlap between them. + +

    + + +

    import tensorflow as tf
    +
    +from tensorflow.keras import datasets, layers, models
    +import matplotlib.pyplot as plt
    +
    +# We import the data set
    +(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
    +
    +# Normalize pixel values to be between 0 and 1 by dividing by 255. 
    +train_images, test_images = train_images / 255.0, test_images / 255.0
    +
    +

    +









    + +

    Verifying the data set

    + +

    +To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image. + +

    + + +

    class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
    +               'dog', 'frog', 'horse', 'ship', 'truck']
    +
    +plt.figure(figsize=(10,10))
    +for i in range(25):
    +    plt.subplot(5,5,i+1)
    +    plt.xticks([])
    +    plt.yticks([])
    +    plt.grid(False)
    +    plt.imshow(train_images[i], cmap=plt.cm.binary)
    +    # The CIFAR labels happen to be arrays, 
    +    # which is why you need the extra index
    +    plt.xlabel(class_names[train_labels[i][0]])
    +plt.show()
    +
    +

    +









    + +

    Set up the model

    + +

    +The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers. + +

    +As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer. + +

    + + +

    model = models.Sequential()
    +model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +
    +# Let's display the architecture of our model so far.
    +
    +model.summary()
    +
    +

    +You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer. + +

    +









    + +

    Add Dense layers on top

    + +

    +To complete our model, you will feed the last output tensor from the +convolutional base (of shape (4, 4, 64)) into one or more Dense layers +to perform classification. Dense layers take vectors as input (which +are 1D), while the current output is a 3D tensor. First, you will +flatten (or unroll) the 3D output to 1D, then add one or more Dense +layers on top. CIFAR has 10 output classes, so you use a final Dense +layer with 10 outputs and a softmax activation. + +

    + + +

    model.add(layers.Flatten())
    +model.add(layers.Dense(64, activation='relu'))
    +model.add(layers.Dense(10))
    +Here's the complete architecture of our model.
    +
    +model.summary()
    +
    +

    +As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers. + +

    +









    + +

    Compile and train the model

    + +

    + + +

    model.compile(optimizer='adam',
    +              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    +              metrics=['accuracy'])
    +
    +history = model.fit(train_images, train_labels, epochs=10, 
    +                    validation_data=(test_images, test_labels))
    +
    +

    +









    + +

    Finally, evaluate the model

    + +

    + + +

    plt.plot(history.history['accuracy'], label='accuracy')
    +plt.plot(history.history['val_accuracy'], label = 'val_accuracy')
    +plt.xlabel('Epoch')
    +plt.ylabel('Accuracy')
    +plt.ylim([0.5, 1])
    +plt.legend(loc='lower right')
    +
    +test_loss, test_acc = model.evaluate(test_images,  test_labels, verbose=2)
    +
    +print(test_acc)
    +
    +

    +









    + +

    Recurrent neural networks: Overarching view

    Till now our focus has been, including convolutional neural networks @@ -611,7 +757,7 @@ systems such as automatic translation and speech-to-text.











    -

    Set up of an RNN

    +

    Set up of an RNN

    The figure here displays a simple example of an RNN, with inputs \( x_t \) @@ -626,10 +772,13 @@ This means also that we need to have weights that link both the inputs from the previous time \( y_{t-1} \) and \( y_t \). The figure here shows an example of a simple RNN. +

    +More material will be added here. +











    -

    Solving differential equations and eigenvalue problems with RNNs

    +

    Solving differential equations and eigenvalue problems with RNNs

    In our discussions of ordinary differential equations and partial @@ -645,7 +794,7 @@ we start directly with an eigenvaule problem.











    -

    Long-Short Time Memory

    +

    Long-Short Time Memory

    Discussions about dynamic unrolling through time. discuss memory cells, input and output @@ -653,7 +802,7 @@ Discussions about dynamic unrolling through time. discuss memory cells, input an











    -

    Autoencoders: Overarching view

    +

    Autoencoders: Overarching view

    Autoencoders are artificial neural networks capable of learning @@ -685,7 +834,7 @@ learn the identity function under some constraints.











    -

    Simple examples of Autoencoders

    +

    Simple examples of Autoencoders

    diff --git a/doc/pub/week42/html/week42.html b/doc/pub/week42/html/week42.html index f411c41f0..a7e8c9099 100644 --- a/doc/pub/week42/html/week42.html +++ b/doc/pub/week42/html/week42.html @@ -71,19 +71,25 @@ div { text-align: justify; text-justify: inter-word; } ('Running with Keras', 2, None, '___sec15'), ('Final part', 2, None, '___sec16'), ('Final visualization', 2, None, '___sec17'), + ('The CIFAR01 data set', 2, None, '___sec18'), + ('Verifying the data set', 2, None, '___sec19'), + ('Set up the model', 2, None, '___sec20'), + ('Add Dense layers on top', 2, None, '___sec21'), + ('Compile and train the model', 2, None, '___sec22'), + ('Finally, evaluate the model', 2, None, '___sec23'), ('Recurrent neural networks: Overarching view', 2, None, - '___sec18'), - ('Set up of an RNN', 2, None, '___sec19'), + '___sec24'), + ('Set up of an RNN', 2, None, '___sec25'), ('Solving differential equations and eigenvalue problems with ' 'RNNs', 2, None, - '___sec20'), - ('Long-Short Time Memory', 2, None, '___sec21'), - ('Autoencoders: Overarching view', 2, None, '___sec22'), - ('Simple examples of Autoencoders', 2, None, '___sec23')]} + '___sec26'), + ('Long-Short Time Memory', 2, None, '___sec27'), + ('Autoencoders: Overarching view', 2, None, '___sec28'), + ('Simple examples of Autoencoders', 2, None, '___sec29')]} end of tocinfo --> @@ -125,7 +131,7 @@ MathJax.Hub.Config({

    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 10, 2020

    +

    Oct 11, 2020












    @@ -591,7 +597,147 @@ plt.show()











    -

    Recurrent neural networks: Overarching view

    +

    The CIFAR01 data set

    + +

    +The CIFAR10 dataset contains 60,000 color images in 10 classes, with +6,000 images in each class. The dataset is divided into 50,000 +training images and 10,000 testing images. The classes are mutually +exclusive and there is no overlap between them. + +

    + + +

    import tensorflow as tf
    +
    +from tensorflow.keras import datasets, layers, models
    +import matplotlib.pyplot as plt
    +
    +# We import the data set
    +(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
    +
    +# Normalize pixel values to be between 0 and 1 by dividing by 255. 
    +train_images, test_images = train_images / 255.0, test_images / 255.0
    +
    +

    +









    + +

    Verifying the data set

    + +

    +To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image. + +

    + + +

    class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',
    +               'dog', 'frog', 'horse', 'ship', 'truck']
    +​
    +plt.figure(figsize=(10,10))
    +for i in range(25):
    +    plt.subplot(5,5,i+1)
    +    plt.xticks([])
    +    plt.yticks([])
    +    plt.grid(False)
    +    plt.imshow(train_images[i], cmap=plt.cm.binary)
    +    # The CIFAR labels happen to be arrays, 
    +    # which is why you need the extra index
    +    plt.xlabel(class_names[train_labels[i][0]])
    +plt.show()
    +
    +

    +









    + +

    Set up the model

    + +

    +The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers. + +

    +As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer. + +

    + + +

    model = models.Sequential()
    +model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +model.add(layers.MaxPooling2D((2, 2)))
    +model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    +
    +# Let's display the architecture of our model so far.
    +
    +model.summary()
    +
    +

    +You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer. + +

    +









    + +

    Add Dense layers on top

    + +

    +To complete our model, you will feed the last output tensor from the +convolutional base (of shape (4, 4, 64)) into one or more Dense layers +to perform classification. Dense layers take vectors as input (which +are 1D), while the current output is a 3D tensor. First, you will +flatten (or unroll) the 3D output to 1D, then add one or more Dense +layers on top. CIFAR has 10 output classes, so you use a final Dense +layer with 10 outputs and a softmax activation. + +

    + + +

    model.add(layers.Flatten())
    +model.add(layers.Dense(64, activation='relu'))
    +model.add(layers.Dense(10))
    +Here's the complete architecture of our model.
    +
    +model.summary()
    +
    +

    +As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers. + +

    +









    + +

    Compile and train the model

    + +

    + + +

    model.compile(optimizer='adam',
    +              loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    +              metrics=['accuracy'])
    +​
    +history = model.fit(train_images, train_labels, epochs=10, 
    +                    validation_data=(test_images, test_labels))
    +
    +

    +









    + +

    Finally, evaluate the model

    + +

    + + +

    plt.plot(history.history['accuracy'], label='accuracy')
    +plt.plot(history.history['val_accuracy'], label = 'val_accuracy')
    +plt.xlabel('Epoch')
    +plt.ylabel('Accuracy')
    +plt.ylim([0.5, 1])
    +plt.legend(loc='lower right')
    +
    +test_loss, test_acc = model.evaluate(test_images,  test_labels, verbose=2)
    +
    +print(test_acc)
    +
    +

    +









    + +

    Recurrent neural networks: Overarching view

    Till now our focus has been, including convolutional neural networks @@ -616,7 +762,7 @@ systems such as automatic translation and speech-to-text.











    -

    Set up of an RNN

    +

    Set up of an RNN

    The figure here displays a simple example of an RNN, with inputs \( x_t \) @@ -631,10 +777,13 @@ This means also that we need to have weights that link both the inputs from the previous time \( y_{t-1} \) and \( y_t \). The figure here shows an example of a simple RNN. +

    +More material will be added here. +











    -

    Solving differential equations and eigenvalue problems with RNNs

    +

    Solving differential equations and eigenvalue problems with RNNs

    In our discussions of ordinary differential equations and partial @@ -650,7 +799,7 @@ we start directly with an eigenvaule problem.











    -

    Long-Short Time Memory

    +

    Long-Short Time Memory

    Discussions about dynamic unrolling through time. discuss memory cells, input and output @@ -658,7 +807,7 @@ Discussions about dynamic unrolling through time. discuss memory cells, input an











    -

    Autoencoders: Overarching view

    +

    Autoencoders: Overarching view

    Autoencoders are artificial neural networks capable of learning @@ -690,7 +839,7 @@ learn the identity function under some constraints.











    -

    Simple examples of Autoencoders

    +

    Simple examples of Autoencoders

    diff --git a/doc/pub/week42/ipynb/ipynb-week42-src.tar.gz b/doc/pub/week42/ipynb/ipynb-week42-src.tar.gz index cd0706867c7d796e20232f7a7f9509d156f6ddd1..37eb3296f19b78942ff1f0a129379476a930015c 100644 GIT binary patch delta 21 ccmdn6igm*(R(APr4u%iK&5i6^*%>uM0ar5zApigX delta 21 ccmdn6igm*(R(APr4u+N7O^xhZ*%>uM0Z_dLaR2}S diff --git a/doc/pub/week42/ipynb/week42.ipynb b/doc/pub/week42/ipynb/week42.ipynb index a48999e98..12354e104 100644 --- a/doc/pub/week42/ipynb/week42.ipynb +++ b/doc/pub/week42/ipynb/week42.ipynb @@ -10,7 +10,7 @@ " \n", "**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n", "\n", - "Date: **Oct 10, 2020**\n", + "Date: **Oct 11, 2020**\n", "\n", "Copyright 1999-2020, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license\n", "\n", @@ -493,6 +493,190 @@ "plt.show()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## The CIFAR01 data set\n", + "\n", + "The CIFAR10 dataset contains 60,000 color images in 10 classes, with\n", + "6,000 images in each class. The dataset is divided into 50,000\n", + "training images and 10,000 testing images. The classes are mutually\n", + "exclusive and there is no overlap between them." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import tensorflow as tf\n", + "\n", + "from tensorflow.keras import datasets, layers, models\n", + "import matplotlib.pyplot as plt\n", + "\n", + "# We import the data set\n", + "(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()\n", + "\n", + "# Normalize pixel values to be between 0 and 1 by dividing by 255. \n", + "train_images, test_images = train_images / 255.0, test_images / 255.0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Verifying the data set\n", + "\n", + "To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer',\n", + " 'dog', 'frog', 'horse', 'ship', 'truck']\n", + "​\n", + "plt.figure(figsize=(10,10))\n", + "for i in range(25):\n", + " plt.subplot(5,5,i+1)\n", + " plt.xticks([])\n", + " plt.yticks([])\n", + " plt.grid(False)\n", + " plt.imshow(train_images[i], cmap=plt.cm.binary)\n", + " # The CIFAR labels happen to be arrays, \n", + " # which is why you need the extra index\n", + " plt.xlabel(class_names[train_labels[i][0]])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Set up the model\n", + "\n", + "The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers.\n", + "\n", + "As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "model = models.Sequential()\n", + "model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3)))\n", + "model.add(layers.MaxPooling2D((2, 2)))\n", + "model.add(layers.Conv2D(64, (3, 3), activation='relu'))\n", + "model.add(layers.MaxPooling2D((2, 2)))\n", + "model.add(layers.Conv2D(64, (3, 3), activation='relu'))\n", + "\n", + "# Let's display the architecture of our model so far.\n", + "\n", + "model.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer.\n", + "\n", + "\n", + "\n", + "\n", + "## Add Dense layers on top\n", + "\n", + "To complete our model, you will feed the last output tensor from the\n", + "convolutional base (of shape (4, 4, 64)) into one or more Dense layers\n", + "to perform classification. Dense layers take vectors as input (which\n", + "are 1D), while the current output is a 3D tensor. First, you will\n", + "flatten (or unroll) the 3D output to 1D, then add one or more Dense\n", + "layers on top. CIFAR has 10 output classes, so you use a final Dense\n", + "layer with 10 outputs and a softmax activation." + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "model.add(layers.Flatten())\n", + "model.add(layers.Dense(64, activation='relu'))\n", + "model.add(layers.Dense(10))\n", + "Here's the complete architecture of our model.\n", + "\n", + "model.summary()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers.\n", + "\n", + "## Compile and train the model" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "model.compile(optimizer='adam',\n", + " loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),\n", + " metrics=['accuracy'])\n", + "​\n", + "history = model.fit(train_images, train_labels, epochs=10, \n", + " validation_data=(test_images, test_labels))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Finally, evaluate the model" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.plot(history.history['accuracy'], label='accuracy')\n", + "plt.plot(history.history['val_accuracy'], label = 'val_accuracy')\n", + "plt.xlabel('Epoch')\n", + "plt.ylabel('Accuracy')\n", + "plt.ylim([0.5, 1])\n", + "plt.legend(loc='lower right')\n", + "\n", + "test_loss, test_acc = model.evaluate(test_images, test_labels, verbose=2)\n", + "\n", + "print(test_acc)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -531,6 +715,7 @@ "from the previous time $y_{t-1}$ and $y_t$. The figure here shows an\n", "example of a simple RNN.\n", "\n", + "More material will be added here.\n", "\n", "\n", "## Solving differential equations and eigenvalue problems with RNNs\n", diff --git a/doc/src/week42/week42.do.txt b/doc/src/week42/week42.do.txt index 56b4ad1c4..b0796b9c6 100644 --- a/doc/src/week42/week42.do.txt +++ b/doc/src/week42/week42.do.txt @@ -406,6 +406,128 @@ plt.show() +!split +===== The CIFAR01 data set ===== + +The CIFAR10 dataset contains 60,000 color images in 10 classes, with +6,000 images in each class. The dataset is divided into 50,000 +training images and 10,000 testing images. The classes are mutually +exclusive and there is no overlap between them. + +!bc pycod +import tensorflow as tf + +from tensorflow.keras import datasets, layers, models +import matplotlib.pyplot as plt + +# We import the data set +(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data() + +# Normalize pixel values to be between 0 and 1 by dividing by 255. +train_images, test_images = train_images / 255.0, test_images / 255.0 + +!ec + + + +!split +===== Verifying the data set ===== + +To verify that the dataset looks correct, let's plot the first 25 images from the training set and display the class name below each image. + +!bc pycod +class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', + 'dog', 'frog', 'horse', 'ship', 'truck'] +​ +plt.figure(figsize=(10,10)) +for i in range(25): + plt.subplot(5,5,i+1) + plt.xticks([]) + plt.yticks([]) + plt.grid(False) + plt.imshow(train_images[i], cmap=plt.cm.binary) + # The CIFAR labels happen to be arrays, + # which is why you need the extra index + plt.xlabel(class_names[train_labels[i][0]]) +plt.show() +!ec + +!split +===== Set up the model ===== + +The 6 lines of code below define the convolutional base using a common pattern: a stack of Conv2D and MaxPooling2D layers. + +As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these dimensions, color_channels refers to (R,G,B). In this example, you will configure our CNN to process inputs of shape (32, 32, 3), which is the format of CIFAR images. You can do this by passing the argument input_shape to our first layer. + +!bc pycod +model = models.Sequential() +model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(32, 32, 3))) +model.add(layers.MaxPooling2D((2, 2))) +model.add(layers.Conv2D(64, (3, 3), activation='relu')) +model.add(layers.MaxPooling2D((2, 2))) +model.add(layers.Conv2D(64, (3, 3), activation='relu')) + +# Let's display the architecture of our model so far. + +model.summary() +!ec + +You can see that the output of every Conv2D and MaxPooling2D layer is a 3D tensor of shape (height, width, channels). The width and height dimensions tend to shrink as you go deeper in the network. The number of output channels for each Conv2D layer is controlled by the first argument (e.g., 32 or 64). Typically, as the width and height shrink, you can afford (computationally) to add more output channels in each Conv2D layer. + + + + +!split +===== Add Dense layers on top ===== + +To complete our model, you will feed the last output tensor from the +convolutional base (of shape (4, 4, 64)) into one or more Dense layers +to perform classification. Dense layers take vectors as input (which +are 1D), while the current output is a 3D tensor. First, you will +flatten (or unroll) the 3D output to 1D, then add one or more Dense +layers on top. CIFAR has 10 output classes, so you use a final Dense +layer with 10 outputs and a softmax activation. + +!bc pycod +model.add(layers.Flatten()) +model.add(layers.Dense(64, activation='relu')) +model.add(layers.Dense(10)) +Here's the complete architecture of our model. + +model.summary() +!ec +As you can see, our (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers. + +!split +===== Compile and train the model ===== + +!bc pycod +model.compile(optimizer='adam', + loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True), + metrics=['accuracy']) +​ +history = model.fit(train_images, train_labels, epochs=10, + validation_data=(test_images, test_labels)) + +!ec + + +!split +===== Finally, evaluate the model ===== + +!bc pycod +plt.plot(history.history['accuracy'], label='accuracy') +plt.plot(history.history['val_accuracy'], label = 'val_accuracy') +plt.xlabel('Epoch') +plt.ylabel('Accuracy') +plt.ylim([0.5, 1]) +plt.legend(loc='lower right') + +test_loss, test_acc = model.evaluate(test_images, test_labels, verbose=2) + +print(test_acc) + +!ec !split ===== Recurrent neural networks: Overarching view ===== @@ -442,6 +564,7 @@ $x_t$ to the outputs $y_t$ as well as weights that link the output from the previous time $y_{t-1}$ and $y_t$. The figure here shows an example of a simple RNN. +More material will be added here. !split