added dotfiles

This commit is contained in:
mhjensen
2020-10-10 21:31:35 +02:00
parent 1f5c5353a6
commit c7b9cc36c1
27 changed files with 5775 additions and 0 deletions
+232
View File
@@ -0,0 +1,232 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0000"></a>
<!-- ------------------- main content ---------------------- -->
<div class="jumbotron">
<center><h1>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</h1></center> <!-- document title -->
<p>
<!-- author(s): Morten Hjorth-Jensen -->
<center>
<b>Morten Hjorth-Jensen</b> [1, 2]
</center>
<p>
<!-- institution(s) -->
<center>[1] <b>Department of Physics, University of Oslo</b></center>
<center>[2] <b>Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University</b></center>
<br>
<p>
<center><h4>Oct 10, 2020</h4></center> <!-- date -->
<br>
<p>
<p><a href="._week42-bs001.html" class="btn btn-primary btn-lg">Read &raquo;</a></p>
</div> <!-- end jumbotron -->
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li class="active"><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs001.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright --> &copy; 1999-2020, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
</center>
</body>
</html>
+216
View File
@@ -0,0 +1,216 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0001"></a>
<!-- !split -->
<h2 id="___sec0" class="anchor">Plan for week 42 </h2>
<ul>
<li> Thursday: Convolutional Neural Networks and examples</li>
<li> Friday: Recurrent Neural Networks and Autoencoders</li>
</ul>
Reading suggestions for both days: <a href="https://github.com/CompPhysics/MachineLearning/blob/master/doc/T\
extbooks/TensorflowML.pdf" target="_self">Aurelien Geron's chapters 13 and 14</a>. Autoencoders are discussed in chapter 15 of Geron's text.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs000.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li class="active"><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs002.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+243
View File
@@ -0,0 +1,243 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0002"></a>
<!-- !split -->
<h2 id="___sec1" class="anchor">Convolutional Neural Networks (recognizing images) </h2>
<p>
Convolutional neural networks (CNNs) were developed during the last
decade of the previous century, with a focus on character recognition
tasks. Nowadays, CNNs are a central element in the spectacular success
of deep learning methods. The success in for example image
classifications have made them a central tool for most machine
learning practitioners.
<p>
CNNs are very similar to ordinary Neural Networks.
They are made up of neurons that have learnable weights and
biases. Each neuron receives some inputs, performs a dot product and
optionally follows it with a non-linearity. The whole network still
expresses a single differentiable score function: from the raw image
pixels on one end to class scores at the other. And they still have a
loss function (for example Softmax) on the last (fully-connected) layer
and all the tips/tricks we developed for learning regular Neural
Networks still apply (back propagation, gradient descent etc etc).
<p>
What is the difference? <b>CNN architectures make the explicit assumption that
the inputs are images, which allows us to encode certain properties
into the architecture. These then make the forward function more
efficient to implement and vastly reduce the amount of parameters in
the network.</b>
<p>
Here we provide only a superficial overview, for the more interested, we recommend highly the course
<a href="https://www.uio.no/studier/emner/matnat/ifi/IN5400/index-eng.html" target="_self">IN5400 &#8211; Machine Learning for Image Analysis</a>
and the slides of <a href="http://cs231n.github.io/convolutional-networks/" target="_self">CS231</a>.
<p>
Another good read is the article here <a href="https://arxiv.org/pdf/1603.07285.pdf" target="_self"><tt>https://arxiv.org/pdf/1603.07285.pdf</tt></a>.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs001.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li class="active"><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs003.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+233
View File
@@ -0,0 +1,233 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0003"></a>
<!-- !split -->
<h2 id="___sec2" class="anchor">Regular NNs don&#8217;t scale well to full images </h2>
<p>
As an example, consider
an image of size \( 32\times 32\times 3 \) (32 wide, 32 high, 3 color channels), so a
single fully-connected neuron in a first hidden layer of a regular
Neural Network would have \( 32\times 32\times 3 = 3072 \) weights. This amount still
seems manageable, but clearly this fully-connected structure does not
scale to larger images. For example, an image of more respectable
size, say \( 200\times 200\times 3 \), would lead to neurons that have
\( 200\times 200\times 3 = 120,000 \) weights.
<p>
We could have
several such neurons, and the parameters would add up quickly! Clearly,
this full connectivity is wasteful and the huge number of parameters
would quickly lead to possible overfitting.
<p>
<center> <!-- FIGURE -->
<hr class="figure">
<center><p class="caption">Figure 1: A regular 3-layer Neural Network. </p></center>
<p><img src="figslides/nn.jpeg" align="bottom" width=500></p>
</center>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs002.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li class="active"><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs004.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+246
View File
@@ -0,0 +1,246 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0004"></a>
<!-- !split -->
<h2 id="___sec3" class="anchor">3D volumes of neurons </h2>
<p>
Convolutional Neural Networks take advantage of the fact that the
input consists of images and they constrain the architecture in a more
sensible way.
<p>
In particular, unlike a regular Neural Network, the
layers of a CNN have neurons arranged in 3 dimensions: width,
height, depth. (Note that the word depth here refers to the third
dimension of an activation volume, not to the depth of a full Neural
Network, which can refer to the total number of layers in a network.)
<p>
To understand it better, the above example of an image
with an input volume of
activations has dimensions \( 32\times 32\times 3 \) (width, height,
depth respectively).
<p>
The neurons in a layer will
only be connected to a small region of the layer before it, instead of
all of the neurons in a fully-connected manner. Moreover, the final
output layer could for this specific image have dimensions \( 1\times 1 \times 10 \),
because by the
end of the CNN architecture we will reduce the full image into a
single vector of class scores, arranged along the depth
dimension.
<p>
<center> <!-- FIGURE -->
<hr class="figure">
<center><p class="caption">Figure 2: A CNN arranges its neurons in three dimensions (width, height, depth), as visualized in one of the layers. Every layer of a CNN transforms the 3D input volume to a 3D output volume of neuron activations. In this example, the red input layer holds the image, so its width and height would be the dimensions of the image, and the depth would be 3 (Red, Green, Blue channels). </p></center>
<p><img src="figslides/cnn.jpeg" align="bottom" width=500></p>
</center>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs003.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li class="active"><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs005.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+230
View File
@@ -0,0 +1,230 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0005"></a>
<!-- !split -->
<h2 id="___sec4" class="anchor">Layers used to build CNNs </h2>
<p>
A simple CNN is a sequence of layers, and every layer of a CNN
transforms one volume of activations to another through a
differentiable function. We use three main types of layers to build
CNN architectures: Convolutional Layer, Pooling Layer, and
Fully-Connected Layer (exactly as seen in regular Neural Networks). We
will stack these layers to form a full CNN architecture.
<p>
A simple CNN for image classification could have the architecture:
<ul>
<li> <b>INPUT</b> (\( 32\times 32 \times 3 \)) will hold the raw pixel values of the image, in this case an image of width 32, height 32, and with three color channels R,G,B.</li>
<li> <b>CONV</b> (convolutional )layer will compute the output of neurons that are connected to local regions in the input, each computing a dot product between their weights and a small region they are connected to in the input volume. This may result in volume such as \( [32\times 32\times 12] \) if we decided to use 12 filters.</li>
<li> <b>RELU</b> layer will apply an elementwise activation function, such as the \( max(0,x) \) thresholding at zero. This leaves the size of the volume unchanged (\( [32\times 32\times 12] \)).</li>
<li> <b>POOL</b> (pooling) layer will perform a downsampling operation along the spatial dimensions (width, height), resulting in volume such as \( [16\times 16\times 12] \).</li>
<li> <b>FC</b> (i.e. fully-connected) layer will compute the class scores, resulting in volume of size \( [1\times 1\times 10] \), where each of the 10 numbers correspond to a class score, such as among the 10 categories of the MNIST images we considered above . As with ordinary Neural Networks and as the name implies, each neuron in this layer will be connected to all the numbers in the previous volume.</li>
</ul>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs004.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li class="active"><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs006.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+227
View File
@@ -0,0 +1,227 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0006"></a>
<!-- !split -->
<h2 id="___sec5" class="anchor">Transforming images </h2>
<p>
CNNs transform the original image layer by layer from the original
pixel values to the final class scores.
<p>
Observe that some layers contain
parameters and other don&#8217;t. In particular, the CNN layers perform
transformations that are a function of not only the activations in the
input volume, but also of the parameters (the weights and biases of
the neurons). On the other hand, the RELU/POOL layers will implement a
fixed function. The parameters in the CONV/FC layers will be trained
with gradient descent so that the class scores that the CNN computes
are consistent with the labels in the training set for each image.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs005.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li class="active"><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs007.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+230
View File
@@ -0,0 +1,230 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0007"></a>
<!-- !split -->
<h2 id="___sec6" class="anchor">CNNs in brief </h2>
<p>
In summary:
<ul>
<li> A CNN architecture is in the simplest case a list of Layers that transform the image volume into an output volume (e.g. holding the class scores)</li>
<li> There are a few distinct types of Layers (e.g. CONV/FC/RELU/POOL are by far the most popular)</li>
<li> Each Layer accepts an input 3D volume and transforms it to an output 3D volume through a differentiable function</li>
<li> Each Layer may or may not have parameters (e.g. CONV/FC do, RELU/POOL don&#8217;t)</li>
<li> Each Layer may or may not have additional hyperparameters (e.g. CONV/FC/POOL do, RELU doesn&#8217;t)</li>
</ul>
For more material on convolutional networks, we strongly recommend
the course
<a href="https://www.uio.no/studier/emner/matnat/ifi/IN5400/index-eng.html" target="_self">IN5400 &#8211; Machine Learning for Image Analysis</a>
and the slides of <a href="http://cs231n.github.io/convolutional-networks/" target="_self">CS231</a> which is taught at Stanford University (consistently ranked as one of the top computer science programs in the world). <a href="http://neuralnetworksanddeeplearning.com/chap6.html" target="_self">Michael Nielsen's book is a must read, in particular chapter 6 which deals with CNNs</a>.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs006.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li class="active"><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs008.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+226
View File
@@ -0,0 +1,226 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0008"></a>
<!-- !split -->
<h2 id="___sec7" class="anchor">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras </h2>
<p>
As discussed above, CNNs are neural networks built from the assumption that the inputs
to the network are 2D images. This is important because the number of features or pixels in images
grows very fast with the image size, and an enormous number of weights and biases are needed in order to build an accurate network.
<p>
As before, we still have our input, a hidden layer and an output. What's novel about convolutional networks
are the <b>convolutional</b> and <b>pooling</b> layers stacked in pairs between the input and the hidden layer.
In addition, the data is no longer represented as a 2D feature matrix, instead each input is a number of 2D
matrices, typically 1 for each color dimension (Red, Green, Blue).
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs007.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li class="active"><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs009.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+223
View File
@@ -0,0 +1,223 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0009"></a>
<!-- !split -->
<h2 id="___sec8" class="anchor">Setting it up </h2>
<p>
It means that to represent the entire
dataset of images, we require a 4D matrix or <b>tensor</b>. This tensor has the dimensions:
$$
(n_{inputs},\, n_{pixels, width},\, n_{pixels, height},\, depth) .
$$
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs008.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="._week42-bs001.html">2</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li class="active"><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs010.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+230
View File
@@ -0,0 +1,230 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0010"></a>
<!-- !split -->
<h2 id="___sec9" class="anchor">The MNIST dataset again </h2>
<p>
The MNIST dataset consists of grayscale images with a pixel size of
\( 28\times 28 \), meaning we require \( 28 \times 28 = 724 \) weights to each
neuron in the first hidden layer.
<p>
If we were to analyze images of size \( 128\times 128 \) we would require
\( 128 \times 128 = 16384 \) weights to each neuron. Even worse if we were
dealing with color images, as most images are, we have an image matrix
of size \( 128\times 128 \) for each color dimension (Red, Green, Blue),
meaning 3 times the number of weights \( = 49152 \) are required for every
single neuron in the first hidden layer.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs009.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs002.html">3</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li class="active"><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs011.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+230
View File
@@ -0,0 +1,230 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0011"></a>
<!-- !split -->
<h2 id="___sec10" class="anchor">Strong correlations </h2>
<p>
Images typically have strong local correlations, meaning that a small
part of the image varies little from its neighboring regions. If for
example we have an image of a blue car, we can roughly assume that a
small blue part of the image is surrounded by other blue regions.
<p>
Therefore, instead of connecting every single pixel to a neuron in the
first hidden layer, as we have previously done with deep neural
networks, we can instead connect each neuron to a small part of the
image (in all 3 RGB depth dimensions). The size of each small area is
fixed, and known as a <a href="https://en.wikipedia.org/wiki/Receptive_field" target="_self">receptive</a>.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs010.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs003.html">4</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li class="active"><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs012.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+234
View File
@@ -0,0 +1,234 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0012"></a>
<!-- !split -->
<h2 id="___sec11" class="anchor">Layers of a CNN </h2>
The layers of a convolutional neural network arrange neurons in 3D: width, height and depth.
The input image is typically a square matrix of depth 3.
<p>
A <b>convolution</b> is performed on the image which outputs
a 3D volume of neurons. The weights to the input are arranged in a number of 2D matrices, known as <b>filters</b>.
<p>
Each filter slides along the input image, taking the dot product
between each small part of the image and the filter, in all depth
dimensions. This is then passed through a non-linear function,
typically the <b>Rectified Linear (ReLu)</b> function, which serves as the
activation of the neurons in the first convolutional layer. This is
further passed through a <b>pooling layer</b>, which reduces the size of the
convolutional layer, e.g. by taking the maximum or average across some
small regions, and this serves as input to the next convolutional
layer.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs011.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs004.html">5</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li class="active"><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs013.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+227
View File
@@ -0,0 +1,227 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0013"></a>
<!-- !split -->
<h2 id="___sec12" class="anchor">Systematic reduction </h2>
<p>
By systematically reducing the size of the input volume, through
convolution and pooling, the network should create representations of
small parts of the input, and then from them assemble representations
of larger areas. The final pooling layer is flattened to serve as
input to a hidden layer, such that each neuron in the final pooling
layer is connected to every single neuron in the hidden layer. This
then serves as input to the output layer, e.g. a softmax output for
classification.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs012.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs005.html">6</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li class="active"><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs014.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+260
View File
@@ -0,0 +1,260 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0014"></a>
<!-- !split -->
<h2 id="___sec13" class="anchor">Prerequisites: Collect and pre-process data </h2>
<p>
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #408080; font-style: italic"># import necessary packages</span>
<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">numpy</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">np</span>
<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">matplotlib.pyplot</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">plt</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">sklearn</span> <span style="color: #008000; font-weight: bold">import</span> datasets
<span style="color: #408080; font-style: italic"># ensure the same random numbers appear every time</span>
np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>seed(<span style="color: #666666">0</span>)
<span style="color: #408080; font-style: italic"># display images in notebook</span>
<span style="color: #666666">%</span>matplotlib inline
plt<span style="color: #666666">.</span>rcParams[<span style="color: #BA2121">&#39;figure.figsize&#39;</span>] <span style="color: #666666">=</span> (<span style="color: #666666">12</span>,<span style="color: #666666">12</span>)
<span style="color: #408080; font-style: italic"># download MNIST dataset</span>
digits <span style="color: #666666">=</span> datasets<span style="color: #666666">.</span>load_digits()
<span style="color: #408080; font-style: italic"># define inputs and labels</span>
inputs <span style="color: #666666">=</span> digits<span style="color: #666666">.</span>images
labels <span style="color: #666666">=</span> digits<span style="color: #666666">.</span>target
<span style="color: #408080; font-style: italic"># RGB images have a depth of 3</span>
<span style="color: #408080; font-style: italic"># our images are grayscale so they should have a depth of 1</span>
inputs <span style="color: #666666">=</span> inputs[:,:,:,np<span style="color: #666666">.</span>newaxis]
<span style="color: #008000">print</span>(<span style="color: #BA2121">&quot;inputs = (n_inputs, pixel_width, pixel_height, depth) = &quot;</span> <span style="color: #666666">+</span> <span style="color: #008000">str</span>(inputs<span style="color: #666666">.</span>shape))
<span style="color: #008000">print</span>(<span style="color: #BA2121">&quot;labels = (n_inputs) = &quot;</span> <span style="color: #666666">+</span> <span style="color: #008000">str</span>(labels<span style="color: #666666">.</span>shape))
<span style="color: #408080; font-style: italic"># choose some random images to display</span>
n_inputs <span style="color: #666666">=</span> <span style="color: #008000">len</span>(inputs)
indices <span style="color: #666666">=</span> np<span style="color: #666666">.</span>arange(n_inputs)
random_indices <span style="color: #666666">=</span> np<span style="color: #666666">.</span>random<span style="color: #666666">.</span>choice(indices, size<span style="color: #666666">=5</span>)
<span style="color: #008000; font-weight: bold">for</span> i, image <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">enumerate</span>(digits<span style="color: #666666">.</span>images[random_indices]):
plt<span style="color: #666666">.</span>subplot(<span style="color: #666666">1</span>, <span style="color: #666666">5</span>, i<span style="color: #666666">+1</span>)
plt<span style="color: #666666">.</span>axis(<span style="color: #BA2121">&#39;off&#39;</span>)
plt<span style="color: #666666">.</span>imshow(image, cmap<span style="color: #666666">=</span>plt<span style="color: #666666">.</span>cm<span style="color: #666666">.</span>gray_r, interpolation<span style="color: #666666">=</span><span style="color: #BA2121">&#39;nearest&#39;</span>)
plt<span style="color: #666666">.</span>title(<span style="color: #BA2121">&quot;Label: </span><span style="color: #BB6688; font-weight: bold">%d</span><span style="color: #BA2121">&quot;</span> <span style="color: #666666">%</span> digits<span style="color: #666666">.</span>target[random_indices[i]])
plt<span style="color: #666666">.</span>show()
</pre></div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs013.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs006.html">7</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li class="active"><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs015.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+240
View File
@@ -0,0 +1,240 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0015"></a>
<!-- !split -->
<h2 id="___sec14" class="anchor">Importing Keras and Tensorflow </h2>
<p>
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras</span> <span style="color: #008000; font-weight: bold">import</span> datasets, layers, models
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras.layers</span> <span style="color: #008000; font-weight: bold">import</span> Input
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras.models</span> <span style="color: #008000; font-weight: bold">import</span> Sequential <span style="color: #408080; font-style: italic">#This allows appending layers to existing models</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras.layers</span> <span style="color: #008000; font-weight: bold">import</span> Dense <span style="color: #408080; font-style: italic">#This allows defining the characteristics of a particular layer</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras</span> <span style="color: #008000; font-weight: bold">import</span> optimizers <span style="color: #408080; font-style: italic">#This allows using whichever optimiser we want (sgd,adam,RMSprop)</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras</span> <span style="color: #008000; font-weight: bold">import</span> regularizers <span style="color: #408080; font-style: italic">#This allows using whichever regularizer we want (l1,l2,l1_l2)</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">tensorflow.keras.utils</span> <span style="color: #008000; font-weight: bold">import</span> to_categorical <span style="color: #408080; font-style: italic">#This allows using categorical cross entropy as the cost function</span>
<span style="color: #408080; font-style: italic">#from tensorflow.keras import Conv2D</span>
<span style="color: #408080; font-style: italic">#from tensorflow.keras import MaxPooling2D</span>
<span style="color: #408080; font-style: italic">#from tensorflow.keras import Flatten</span>
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">sklearn.model_selection</span> <span style="color: #008000; font-weight: bold">import</span> train_test_split
<span style="color: #408080; font-style: italic"># representation of labels</span>
labels <span style="color: #666666">=</span> to_categorical(labels)
<span style="color: #408080; font-style: italic"># split into train and test data</span>
<span style="color: #408080; font-style: italic"># one-liner from scikit-learn library</span>
train_size <span style="color: #666666">=</span> <span style="color: #666666">0.8</span>
test_size <span style="color: #666666">=</span> <span style="color: #666666">1</span> <span style="color: #666666">-</span> train_size
X_train, X_test, Y_train, Y_test <span style="color: #666666">=</span> train_test_split(inputs, labels, train_size<span style="color: #666666">=</span>train_size,
test_size<span style="color: #666666">=</span>test_size)
</pre></div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs014.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs007.html">8</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li class="active"><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs016.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+244
View File
@@ -0,0 +1,244 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0016"></a>
<!-- !split -->
<h2 id="___sec15" class="anchor">Running with Keras </h2>
<p>
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">create_convolutional_neural_network_keras</span>(input_shape, receptive_field,
n_filters, n_neurons_connected, n_categories,
eta, lmbd):
model <span style="color: #666666">=</span> Sequential()
model<span style="color: #666666">.</span>add(layers<span style="color: #666666">.</span>Conv2D(n_filters, (receptive_field, receptive_field), input_shape<span style="color: #666666">=</span>input_shape, padding<span style="color: #666666">=</span><span style="color: #BA2121">&#39;same&#39;</span>,
activation<span style="color: #666666">=</span><span style="color: #BA2121">&#39;relu&#39;</span>, kernel_regularizer<span style="color: #666666">=</span>regularizers<span style="color: #666666">.</span>l2(lmbd)))
model<span style="color: #666666">.</span>add(layers<span style="color: #666666">.</span>MaxPooling2D(pool_size<span style="color: #666666">=</span>(<span style="color: #666666">2</span>, <span style="color: #666666">2</span>)))
model<span style="color: #666666">.</span>add(layers<span style="color: #666666">.</span>Flatten())
model<span style="color: #666666">.</span>add(layers<span style="color: #666666">.</span>Dense(n_neurons_connected, activation<span style="color: #666666">=</span><span style="color: #BA2121">&#39;relu&#39;</span>, kernel_regularizer<span style="color: #666666">=</span>regularizers<span style="color: #666666">.</span>l2(lmbd)))
model<span style="color: #666666">.</span>add(layers<span style="color: #666666">.</span>Dense(n_categories, activation<span style="color: #666666">=</span><span style="color: #BA2121">&#39;softmax&#39;</span>, kernel_regularizer<span style="color: #666666">=</span>regularizers<span style="color: #666666">.</span>l2(lmbd)))
sgd <span style="color: #666666">=</span> optimizers<span style="color: #666666">.</span>SGD(lr<span style="color: #666666">=</span>eta)
model<span style="color: #666666">.</span>compile(loss<span style="color: #666666">=</span><span style="color: #BA2121">&#39;categorical_crossentropy&#39;</span>, optimizer<span style="color: #666666">=</span>sgd, metrics<span style="color: #666666">=</span>[<span style="color: #BA2121">&#39;accuracy&#39;</span>])
<span style="color: #008000; font-weight: bold">return</span> model
epochs <span style="color: #666666">=</span> <span style="color: #666666">100</span>
batch_size <span style="color: #666666">=</span> <span style="color: #666666">100</span>
input_shape <span style="color: #666666">=</span> X_train<span style="color: #666666">.</span>shape[<span style="color: #666666">1</span>:<span style="color: #666666">4</span>]
receptive_field <span style="color: #666666">=</span> <span style="color: #666666">3</span>
n_filters <span style="color: #666666">=</span> <span style="color: #666666">10</span>
n_neurons_connected <span style="color: #666666">=</span> <span style="color: #666666">50</span>
n_categories <span style="color: #666666">=</span> <span style="color: #666666">10</span>
eta_vals <span style="color: #666666">=</span> np<span style="color: #666666">.</span>logspace(<span style="color: #666666">-5</span>, <span style="color: #666666">1</span>, <span style="color: #666666">7</span>)
lmbd_vals <span style="color: #666666">=</span> np<span style="color: #666666">.</span>logspace(<span style="color: #666666">-5</span>, <span style="color: #666666">1</span>, <span style="color: #666666">7</span>)
</pre></div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs015.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs008.html">9</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li class="active"><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs017.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+233
View File
@@ -0,0 +1,233 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0017"></a>
<!-- !split -->
<h2 id="___sec16" class="anchor">Final part </h2>
<p>
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span>CNN_keras <span style="color: #666666">=</span> np<span style="color: #666666">.</span>zeros((<span style="color: #008000">len</span>(eta_vals), <span style="color: #008000">len</span>(lmbd_vals)), dtype<span style="color: #666666">=</span><span style="color: #008000">object</span>)
<span style="color: #008000; font-weight: bold">for</span> i, eta <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">enumerate</span>(eta_vals):
<span style="color: #008000; font-weight: bold">for</span> j, lmbd <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">enumerate</span>(lmbd_vals):
CNN <span style="color: #666666">=</span> create_convolutional_neural_network_keras(input_shape, receptive_field,
n_filters, n_neurons_connected, n_categories,
eta, lmbd)
CNN<span style="color: #666666">.</span>fit(X_train, Y_train, epochs<span style="color: #666666">=</span>epochs, batch_size<span style="color: #666666">=</span>batch_size, verbose<span style="color: #666666">=0</span>)
scores <span style="color: #666666">=</span> CNN<span style="color: #666666">.</span>evaluate(X_test, Y_test)
CNN_keras[i][j] <span style="color: #666666">=</span> CNN
<span style="color: #008000">print</span>(<span style="color: #BA2121">&quot;Learning rate = &quot;</span>, eta)
<span style="color: #008000">print</span>(<span style="color: #BA2121">&quot;Lambda = &quot;</span>, lmbd)
<span style="color: #008000">print</span>(<span style="color: #BA2121">&quot;Test accuracy: </span><span style="color: #BB6688; font-weight: bold">%.3f</span><span style="color: #BA2121">&quot;</span> <span style="color: #666666">%</span> scores[<span style="color: #666666">1</span>])
<span style="color: #008000">print</span>()
</pre></div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs016.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs009.html">10</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li class="active"><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs018.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+246
View File
@@ -0,0 +1,246 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0018"></a>
<!-- !split -->
<h2 id="___sec17" class="anchor">Final visualization </h2>
<p>
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="highlight" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><span style="color: #408080; font-style: italic"># visual representation of grid search</span>
<span style="color: #408080; font-style: italic"># uses seaborn heatmap, could probably do this in matplotlib</span>
<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">seaborn</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">sns</span>
sns<span style="color: #666666">.</span>set()
train_accuracy <span style="color: #666666">=</span> np<span style="color: #666666">.</span>zeros((<span style="color: #008000">len</span>(eta_vals), <span style="color: #008000">len</span>(lmbd_vals)))
test_accuracy <span style="color: #666666">=</span> np<span style="color: #666666">.</span>zeros((<span style="color: #008000">len</span>(eta_vals), <span style="color: #008000">len</span>(lmbd_vals)))
<span style="color: #008000; font-weight: bold">for</span> i <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(<span style="color: #008000">len</span>(eta_vals)):
<span style="color: #008000; font-weight: bold">for</span> j <span style="color: #AA22FF; font-weight: bold">in</span> <span style="color: #008000">range</span>(<span style="color: #008000">len</span>(lmbd_vals)):
CNN <span style="color: #666666">=</span> CNN_keras[i][j]
train_accuracy[i][j] <span style="color: #666666">=</span> CNN<span style="color: #666666">.</span>evaluate(X_train, Y_train)[<span style="color: #666666">1</span>]
test_accuracy[i][j] <span style="color: #666666">=</span> CNN<span style="color: #666666">.</span>evaluate(X_test, Y_test)[<span style="color: #666666">1</span>]
fig, ax <span style="color: #666666">=</span> plt<span style="color: #666666">.</span>subplots(figsize <span style="color: #666666">=</span> (<span style="color: #666666">10</span>, <span style="color: #666666">10</span>))
sns<span style="color: #666666">.</span>heatmap(train_accuracy, annot<span style="color: #666666">=</span><span style="color: #008000; font-weight: bold">True</span>, ax<span style="color: #666666">=</span>ax, cmap<span style="color: #666666">=</span><span style="color: #BA2121">&quot;viridis&quot;</span>)
ax<span style="color: #666666">.</span>set_title(<span style="color: #BA2121">&quot;Training Accuracy&quot;</span>)
ax<span style="color: #666666">.</span>set_ylabel(<span style="color: #BA2121">&quot;$\eta$&quot;</span>)
ax<span style="color: #666666">.</span>set_xlabel(<span style="color: #BA2121">&quot;$\lambda$&quot;</span>)
plt<span style="color: #666666">.</span>show()
fig, ax <span style="color: #666666">=</span> plt<span style="color: #666666">.</span>subplots(figsize <span style="color: #666666">=</span> (<span style="color: #666666">10</span>, <span style="color: #666666">10</span>))
sns<span style="color: #666666">.</span>heatmap(test_accuracy, annot<span style="color: #666666">=</span><span style="color: #008000; font-weight: bold">True</span>, ax<span style="color: #666666">=</span>ax, cmap<span style="color: #666666">=</span><span style="color: #BA2121">&quot;viridis&quot;</span>)
ax<span style="color: #666666">.</span>set_title(<span style="color: #BA2121">&quot;Test Accuracy&quot;</span>)
ax<span style="color: #666666">.</span>set_ylabel(<span style="color: #BA2121">&quot;$\eta$&quot;</span>)
ax<span style="color: #666666">.</span>set_xlabel(<span style="color: #BA2121">&quot;$\lambda$&quot;</span>)
plt<span style="color: #666666">.</span>show()
</pre></div>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs017.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs010.html">11</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li class="active"><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs019.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+231
View File
@@ -0,0 +1,231 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0019"></a>
<!-- !split -->
<h2 id="___sec18" class="anchor">Recurrent neural networks: Overarching view </h2>
<p>
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.
<p>
A recurrent neural network (RNN) looks very much like a feedforward
neural network, except that it also has connections pointing
backward.
<p>
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.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs018.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs011.html">12</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li class="active"><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs020.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+223
View File
@@ -0,0 +1,223 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0020"></a>
<!-- !split -->
<h2 id="___sec19" class="anchor">Set up of an RNN </h2>
<p>
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} \).
<p>
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.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs019.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs012.html">13</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li class="active"><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs021.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+220
View File
@@ -0,0 +1,220 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0021"></a>
<!-- !split -->
<h2 id="___sec20" class="anchor">Solving differential equations and eigenvalue problems with RNNs </h2>
<p>
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.
<p>
Instead of starting with a well-known ordinary differential equation,
we start directly with an eigenvaule problem.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs020.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs013.html">14</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li class="active"><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs022.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+211
View File
@@ -0,0 +1,211 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0022"></a>
<!-- !split -->
<h2 id="___sec21" class="anchor">Long-Short Time Memory </h2>
<p>
Discussions about dynamic unrolling through time. discuss memory cells, input and output
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs021.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs014.html">15</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li class="active"><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs023.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+234
View File
@@ -0,0 +1,234 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs024.html#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0023"></a>
<!-- !split -->
<h2 id="___sec22" class="anchor">Autoencoders: Overarching view </h2>
<p>
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.
<p>
More importantly, autoencoders act as powerful feature detectors, and
they can be used for unsupervised pretraining of deep neural networks.
<p>
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&#8217;s attempt to
learn the identity function under some constraints.
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs022.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs015.html">16</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li class="active"><a href="._week42-bs023.html">24</a></li>
<li><a href="._week42-bs024.html">25</a></li>
<li><a href="._week42-bs024.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
+206
View File
@@ -0,0 +1,206 @@
<!--
Automatically generated HTML file from DocOnce source
(https://github.com/hplgit/doconce/)
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/hplgit/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Week 42 Convolutional and Recurrent Neural Networks and Autoencoders">
<title>Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</title>
<!-- Bootstrap style: bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<!-- not necessary
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
-->
<style type="text/css">
/* Add scrollbar to dropdown menus in bootstrap navigation bar */
.dropdown-menu {
height: auto;
max-height: 400px;
overflow-x: hidden;
}
/* Adds an invisible element before each target to offset for the navigation
bar */
.anchor::before {
content:"";
display:block;
height:50px; /* fixed header height for style bootstrap */
margin:-50px 0 0; /* negative fixed header height */
}
</style>
</head>
<!-- tocinfo
{'highest level': 2,
'sections': [('Plan for week 42', 2, None, '___sec0'),
('Convolutional Neural Networks (recognizing images)',
2,
None,
'___sec1'),
('Regular NNs dont scale well to full images',
2,
None,
'___sec2'),
('3D volumes of neurons', 2, None, '___sec3'),
('Layers used to build CNNs', 2, None, '___sec4'),
('Transforming images', 2, None, '___sec5'),
('CNNs in brief', 2, None, '___sec6'),
('CNNs in more detail, building convolutional neural networks in '
'Tensorflow and Keras',
2,
None,
'___sec7'),
('Setting it up', 2, None, '___sec8'),
('The MNIST dataset again', 2, None, '___sec9'),
('Strong correlations', 2, None, '___sec10'),
('Layers of a CNN', 2, None, '___sec11'),
('Systematic reduction', 2, None, '___sec12'),
('Prerequisites: Collect and pre-process data',
2,
None,
'___sec13'),
('Importing Keras and Tensorflow', 2, None, '___sec14'),
('Running with Keras', 2, None, '___sec15'),
('Final part', 2, None, '___sec16'),
('Final visualization', 2, None, '___sec17'),
('Recurrent neural networks: Overarching view',
2,
None,
'___sec18'),
('Set up of an RNN', 2, None, '___sec19'),
('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')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "none" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- Bootstrap navigation bar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="week42-bs.html">Week 42 Convolutional and Recurrent Neural Networks and Autoencoders</a>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
<ul class="dropdown-menu">
<!-- navigation toc: --> <li><a href="._week42-bs001.html#___sec0" style="font-size: 80%;">Plan for week 42</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs002.html#___sec1" style="font-size: 80%;">Convolutional Neural Networks (recognizing images)</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs003.html#___sec2" style="font-size: 80%;">Regular NNs dont scale well to full images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs004.html#___sec3" style="font-size: 80%;">3D volumes of neurons</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs005.html#___sec4" style="font-size: 80%;">Layers used to build CNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs006.html#___sec5" style="font-size: 80%;">Transforming images</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs007.html#___sec6" style="font-size: 80%;">CNNs in brief</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs008.html#___sec7" style="font-size: 80%;">CNNs in more detail, building convolutional neural networks in Tensorflow and Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs009.html#___sec8" style="font-size: 80%;">Setting it up</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs010.html#___sec9" style="font-size: 80%;">The MNIST dataset again</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs011.html#___sec10" style="font-size: 80%;">Strong correlations</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs012.html#___sec11" style="font-size: 80%;">Layers of a CNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs013.html#___sec12" style="font-size: 80%;">Systematic reduction</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs014.html#___sec13" style="font-size: 80%;">Prerequisites: Collect and pre-process data</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs015.html#___sec14" style="font-size: 80%;">Importing Keras and Tensorflow</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs016.html#___sec15" style="font-size: 80%;">Running with Keras</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs017.html#___sec16" style="font-size: 80%;">Final part</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs018.html#___sec17" style="font-size: 80%;">Final visualization</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs019.html#___sec18" style="font-size: 80%;">Recurrent neural networks: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs020.html#___sec19" style="font-size: 80%;">Set up of an RNN</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs021.html#___sec20" style="font-size: 80%;">Solving differential equations and eigenvalue problems with RNNs</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs022.html#___sec21" style="font-size: 80%;">Long-Short Time Memory</a></li>
<!-- navigation toc: --> <li><a href="._week42-bs023.html#___sec22" style="font-size: 80%;">Autoencoders: Overarching view</a></li>
<!-- navigation toc: --> <li><a href="#___sec23" style="font-size: 80%;">Simple examples of Autoencoders</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!-- end of navigation bar -->
<div class="container">
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> <!-- add vertical space -->
<a name="part0024"></a>
<!-- !split -->
<h2 id="___sec23" class="anchor">Simple examples of Autoencoders </h2>
<p>
<p>
<!-- navigation buttons at the bottom of the page -->
<ul class="pagination">
<li><a href="._week42-bs023.html">&laquo;</a></li>
<li><a href="._week42-bs000.html">1</a></li>
<li><a href="">...</a></li>
<li><a href="._week42-bs016.html">17</a></li>
<li><a href="._week42-bs017.html">18</a></li>
<li><a href="._week42-bs018.html">19</a></li>
<li><a href="._week42-bs019.html">20</a></li>
<li><a href="._week42-bs020.html">21</a></li>
<li><a href="._week42-bs021.html">22</a></li>
<li><a href="._week42-bs022.html">23</a></li>
<li><a href="._week42-bs023.html">24</a></li>
<li class="active"><a href="._week42-bs024.html">25</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->
</div> <!-- end container -->
<!-- include javascript, jQuery *first* -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- Bootstrap footer
<footer>
<a href="http://..."><img width="250" align=right src="http://..."></a>
</footer>
-->
<center style="font-size:80%">
<!-- copyright only on the titlepage -->
</center>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB