Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
mhjensen committed Apr 28, 2024
1 parent 4e336ca commit 1ee6eea
Show file tree
Hide file tree
Showing 17 changed files with 1,193 additions and 249 deletions.
63 changes: 17 additions & 46 deletions doc/pub/week15/html/week15-bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,14 @@
2,
None,
'defining-the-training-set'),
('Defining the training set',
2,
None,
'defining-the-training-set'),
('Defining the training set',
('Defining the training set, part 2',
2,
None,
'defining-the-training-set'),
'defining-the-training-set-part-2'),
('Training the GAN', 2, None, 'training-the-gan'),
('Defining the training set',
2,
None,
'defining-the-training-set'),
('More on training', 2, None, 'more-on-training'),
('Visualizing', 2, None, 'visualizing'),
('Calculating scores', 2, None, 'calculating-scores'),
('Diffusion models, basics', 2, None, 'diffusion-models-basics'),
('Mathematics of diffusion models',
2,
Expand Down Expand Up @@ -182,11 +176,11 @@
<!-- navigation toc: --> <li><a href="#setting-up-the-gan" style="font-size: 80%;">Setting up the GAN</a></li>
<!-- navigation toc: --> <li><a href="#printing-the-model" style="font-size: 80%;">Printing the model</a></li>
<!-- navigation toc: --> <li><a href="#defining-the-training-set" style="font-size: 80%;">Defining the training set</a></li>
<!-- navigation toc: --> <li><a href="#defining-the-training-set" style="font-size: 80%;">Defining the training set</a></li>
<!-- navigation toc: --> <li><a href="#defining-the-training-set" style="font-size: 80%;">Defining the training set</a></li>
<!-- navigation toc: --> <li><a href="#defining-the-training-set-part-2" style="font-size: 80%;">Defining the training set, part 2</a></li>
<!-- navigation toc: --> <li><a href="#training-the-gan" style="font-size: 80%;">Training the GAN</a></li>
<!-- navigation toc: --> <li><a href="#defining-the-training-set" style="font-size: 80%;">Defining the training set</a></li>
<!-- navigation toc: --> <li><a href="#more-on-training" style="font-size: 80%;">More on training</a></li>
<!-- navigation toc: --> <li><a href="#visualizing" style="font-size: 80%;">Visualizing</a></li>
<!-- navigation toc: --> <li><a href="#calculating-scores" style="font-size: 80%;">Calculating scores</a></li>
<!-- navigation toc: --> <li><a href="#diffusion-models-basics" style="font-size: 80%;">Diffusion models, basics</a></li>
<!-- navigation toc: --> <li><a href="#mathematics-of-diffusion-models" style="font-size: 80%;">Mathematics of diffusion models</a></li>

Expand Down Expand Up @@ -668,33 +662,6 @@ <h2 id="printing-the-model" class="anchor">Printing the model </h2>
<h2 id="defining-the-training-set" class="anchor">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #f8f8f8">
<pre style="line-height: 125%;">
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>


<!-- !split -->
<h2 id="defining-the-training-set" class="anchor">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
Expand All @@ -713,7 +680,7 @@ <h2 id="defining-the-training-set" class="anchor">Defining the training set </h2
mnist_dataset <span style="color: #666666">=</span> torchvision<span style="color: #666666">.</span>datasets<span style="color: #666666">.</span>MNIST(root<span style="color: #666666">=</span>image_path,
train<span style="color: #666666">=</span><span style="color: #008000; font-weight: bold">True</span>,
transform<span style="color: #666666">=</span>transform,
download<span style="color: #666666">=</span><span style="color: #008000; font-weight: bold">False</span>)
download<span style="color: #666666">=</span><span style="color: #008000; font-weight: bold">True</span>)

example, label <span style="color: #666666">=</span> <span style="color: #008000">next</span>(<span style="color: #008000">iter</span>(mnist_dataset))
<span style="color: #008000">print</span>(<span style="color: #BA2121">f&#39;Min: </span><span style="color: #BB6688; font-weight: bold">{</span>example<span style="color: #666666">.</span>min()<span style="color: #BB6688; font-weight: bold">}</span><span style="color: #BA2121"> Max: </span><span style="color: #BB6688; font-weight: bold">{</span>example<span style="color: #666666">.</span>max()<span style="color: #BB6688; font-weight: bold">}</span><span style="color: #BA2121">&#39;</span>)
Expand All @@ -735,7 +702,7 @@ <h2 id="defining-the-training-set" class="anchor">Defining the training set </h2


<!-- !split -->
<h2 id="defining-the-training-set" class="anchor">Defining the training set </h2>
<h2 id="defining-the-training-set-part-2" class="anchor">Defining the training set, part 2 </h2>


<!-- code=python (!bc pycod) typeset with pygments style "default" -->
Expand Down Expand Up @@ -831,7 +798,7 @@ <h2 id="training-the-gan" class="anchor">Training the GAN </h2>


<!-- !split -->
<h2 id="defining-the-training-set" class="anchor">Defining the training set </h2>
<h2 id="more-on-training" class="anchor">More on training </h2>


<!-- code=python (!bc pycod) typeset with pygments style "default" -->
Expand Down Expand Up @@ -1069,15 +1036,19 @@ <h2 id="visualizing" class="anchor">Visualizing </h2>
</div>
</div>
</div>
</div>


<!-- !split -->
<h2 id="calculating-scores" class="anchor">Calculating scores </h2>

<!-- code=python (!bc pycod) typeset with pygments style "default" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #f8f8f8">
<pre style="line-height: 125%;"><span style="color: #666666">=====</span> Calculating scores <span style="color: #666666">=====</span>

<span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">math</span>
<pre style="line-height: 125%;"><span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">math</span>


<span style="color: #008000; font-weight: bold">def</span> <span style="color: #0000FF">distance</span>(X, Y, sqrt):
Expand Down
43 changes: 10 additions & 33 deletions doc/pub/week15/html/week15-reveal.html
Original file line number Diff line number Diff line change
Expand Up @@ -669,33 +669,6 @@ <h2 id="printing-the-model">Printing the model </h2>
<h2 id="defining-the-training-set">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #eeeedd">
<pre style="font-size: 80%; line-height: 125%;">
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
</section>

<section>
<h2 id="defining-the-training-set">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
Expand All @@ -714,7 +687,7 @@ <h2 id="defining-the-training-set">Defining the training set </h2>
mnist_dataset = torchvision.datasets.MNIST(root=image_path,
train=<span style="color: #8B008B; font-weight: bold">True</span>,
transform=transform,
download=<span style="color: #8B008B; font-weight: bold">False</span>)
download=<span style="color: #8B008B; font-weight: bold">True</span>)

example, label = <span style="color: #658b00">next</span>(<span style="color: #658b00">iter</span>(mnist_dataset))
<span style="color: #658b00">print</span>(<span style="color: #CD5555">f&#39;Min: {</span>example.min()<span style="color: #CD5555">} Max: {</span>example.max()<span style="color: #CD5555">}&#39;</span>)
Expand All @@ -736,7 +709,7 @@ <h2 id="defining-the-training-set">Defining the training set </h2>
</section>

<section>
<h2 id="defining-the-training-set">Defining the training set </h2>
<h2 id="defining-the-training-set-part-2">Defining the training set, part 2 </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
Expand Down Expand Up @@ -832,7 +805,7 @@ <h2 id="training-the-gan">Training the GAN </h2>
</section>

<section>
<h2 id="defining-the-training-set">Defining the training set </h2>
<h2 id="more-on-training">More on training </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
Expand Down Expand Up @@ -1070,15 +1043,19 @@ <h2 id="visualizing">Visualizing </h2>
</div>
</div>
</div>
</div>
</section>

<section>
<h2 id="calculating-scores">Calculating scores </h2>

<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #eeeedd">
<pre style="font-size: 80%; line-height: 125%;">===== Calculating scores =====

<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">math</span>
<pre style="font-size: 80%; line-height: 125%;"><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">math</span>


<span style="color: #8B008B; font-weight: bold">def</span> <span style="color: #008b45">distance</span>(X, Y, sqrt):
Expand Down
57 changes: 14 additions & 43 deletions doc/pub/week15/html/week15-solarized.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,14 @@
2,
None,
'defining-the-training-set'),
('Defining the training set',
2,
None,
'defining-the-training-set'),
('Defining the training set',
('Defining the training set, part 2',
2,
None,
'defining-the-training-set'),
'defining-the-training-set-part-2'),
('Training the GAN', 2, None, 'training-the-gan'),
('Defining the training set',
2,
None,
'defining-the-training-set'),
('More on training', 2, None, 'more-on-training'),
('Visualizing', 2, None, 'visualizing'),
('Calculating scores', 2, None, 'calculating-scores'),
('Diffusion models, basics', 2, None, 'diffusion-models-basics'),
('Mathematics of diffusion models',
2,
Expand Down Expand Up @@ -632,33 +626,6 @@ <h2 id="printing-the-model">Printing the model </h2>
<h2 id="defining-the-training-set">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">
</pre>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>


<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="defining-the-training-set">Defining the training set </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
Expand All @@ -677,7 +644,7 @@ <h2 id="defining-the-training-set">Defining the training set </h2>
mnist_dataset = torchvision.datasets.MNIST(root=image_path,
train=<span style="color: #8B008B; font-weight: bold">True</span>,
transform=transform,
download=<span style="color: #8B008B; font-weight: bold">False</span>)
download=<span style="color: #8B008B; font-weight: bold">True</span>)

example, label = <span style="color: #658b00">next</span>(<span style="color: #658b00">iter</span>(mnist_dataset))
<span style="color: #658b00">print</span>(<span style="color: #CD5555">f&#39;Min: {</span>example.min()<span style="color: #CD5555">} Max: {</span>example.max()<span style="color: #CD5555">}&#39;</span>)
Expand All @@ -699,7 +666,7 @@ <h2 id="defining-the-training-set">Defining the training set </h2>


<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="defining-the-training-set">Defining the training set </h2>
<h2 id="defining-the-training-set-part-2">Defining the training set, part 2 </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
Expand Down Expand Up @@ -795,7 +762,7 @@ <h2 id="training-the-gan">Training the GAN </h2>


<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="defining-the-training-set">Defining the training set </h2>
<h2 id="more-on-training">More on training </h2>


<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
Expand Down Expand Up @@ -1033,15 +1000,19 @@ <h2 id="visualizing">Visualizing </h2>
</div>
</div>
</div>
</div>


<!-- !split --><br><br><br><br><br><br><br><br><br><br>
<h2 id="calculating-scores">Calculating scores </h2>

<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">===== Calculating scores =====

<span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">math</span>
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">math</span>


<span style="color: #8B008B; font-weight: bold">def</span> <span style="color: #008b45">distance</span>(X, Y, sqrt):
Expand Down
Loading

0 comments on commit 1ee6eea

Please sign in to comment.