Updating slides
This commit is contained in:
@@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source
|
||||
<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="Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks">
|
||||
|
||||
<title>Data Analysis and Machine Learning: Neural networks, from the simple perceptron to deep learning and convolutional networks</title>
|
||||
@@ -369,19 +370,18 @@ MathJax.Hub.Config({
|
||||
|
||||
<span style="color: #008000; font-weight: bold">class</span> <span style="color: #0000FF; font-weight: bold">NeuralNetworkTensorflow</span>:
|
||||
<span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">__init__</span>(
|
||||
<span style="color: #008000">self</span>,
|
||||
X_train,
|
||||
Y_train,
|
||||
X_test,
|
||||
Y_test,
|
||||
n_neurons_layer1<span style="color: #666666">=100</span>,
|
||||
n_neurons_layer2<span style="color: #666666">=50</span>,
|
||||
n_categories<span style="color: #666666">=2</span>,
|
||||
epochs<span style="color: #666666">=10</span>,
|
||||
batch_size<span style="color: #666666">=100</span>,
|
||||
eta<span style="color: #666666">=0.1</span>,
|
||||
lmbd<span style="color: #666666">=0.0</span>,
|
||||
):
|
||||
<span style="color: #008000">self</span>,
|
||||
X_train,
|
||||
Y_train,
|
||||
X_test,
|
||||
Y_test,
|
||||
n_neurons_layer1<span style="color: #666666">=100</span>,
|
||||
n_neurons_layer2<span style="color: #666666">=50</span>,
|
||||
n_categories<span style="color: #666666">=2</span>,
|
||||
epochs<span style="color: #666666">=10</span>,
|
||||
batch_size<span style="color: #666666">=100</span>,
|
||||
eta<span style="color: #666666">=0.1</span>,
|
||||
lmbd<span style="color: #666666">=0.0</span>):
|
||||
|
||||
<span style="color: #408080; font-style: italic"># keep track of number of steps</span>
|
||||
<span style="color: #008000">self</span><span style="color: #666666">.</span>global_step <span style="color: #666666">=</span> tf<span style="color: #666666">.</span>Variable(<span style="color: #666666">0</span>, dtype<span style="color: #666666">=</span>tf<span style="color: #666666">.</span>int32, trainable<span style="color: #666666">=</span><span style="color: #008000">False</span>, name<span style="color: #666666">=</span><span style="color: #BA2121">'global_step'</span>)
|
||||
|
||||
Reference in New Issue
Block a user