Skip to content

Commit

Permalink
Add hideText param in the URL that hides the text below the viz.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmilkov authored and Daniel Smilkov committed Sep 8, 2016
1 parent d3d4b22 commit 11ea768
Show file tree
Hide file tree
Showing 7 changed files with 1,755 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dist/bundle.css

Large diffs are not rendered by default.

1,741 changes: 1,739 additions & 2 deletions dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ <h4>Output</h4>
</div>
<!-- Article -->

<article>
<article id="article-text">
<div class="l--body">
<h2>Um, What Is a Neural Network?</h2>
<p>It’s a technique for building a computer program that learns from data. It is based very loosely on how we think the human brain works. First, a collection of software “neurons” are created and connected together, allowing them to send messages to each other. Next, the network is asked to solve a problem, which it attempts to do over and over, each time strengthening the connections that lead to success and diminishing those that lead to failure. For a more detailed introduction to neural networks, Michael Nielsen’s <a href="http://neuralnetworksanddeeplearning.com/index.html">Neural Networks and Deep Learning</a> is a good place to start. For a more technical overview, try <a href="http://www.deeplearningbook.org/">Deep Learning</a> by Ian Goodfellow, Yoshua Bengio, and Aaron Courville.</p>
Expand Down
6 changes: 3 additions & 3 deletions dist/lib.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ <h4>Output</h4>
</div>
<!-- Article -->

<article>
<article id="article-text">
<div class="l--body">
<h2>Um, What Is a Neural Network?</h2>
<p>It’s a technique for building a computer program that learns from data. It is based very loosely on how we think the human brain works. First, a collection of software “neurons” are created and connected together, allowing them to send messages to each other. Next, the network is asked to solve a problem, which it attempts to do over and over, each time strengthening the connections that lead to success and diminishing those that lead to failure. For a more detailed introduction to neural networks, Michael Nielsen’s <a href="http://neuralnetworksanddeeplearning.com/index.html">Neural Networks and Deep Learning</a> is a good place to start. For a more technical overview, try <a href="http://www.deeplearningbook.org/">Deep Learning</a> by Ian Goodfellow, Yoshua Bengio, and Aaron Courville.</p>
Expand Down
6 changes: 6 additions & 0 deletions playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ function makeGUI() {
updateUI(true);
}
});

// Hide the text below the visualization depending on the URL.
if (state.hideText) {
d3.select("#article-text").style("display", "none");
d3.select("div.more").style("display", "none");
}
}

function updateBiasesUI(network: nn.Node[][]) {
Expand Down
4 changes: 3 additions & 1 deletion state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export class State {
{name: "collectStats", type: Type.BOOLEAN},
{name: "tutorial", type: Type.STRING},
{name: "problem", type: Type.OBJECT, keyMap: problems},
{name: "initZero", type: Type.BOOLEAN}
{name: "initZero", type: Type.BOOLEAN},
{name: "hideText", type: Type.BOOLEAN}
];

[key: string]: any;
Expand All @@ -145,6 +146,7 @@ export class State {
regularization: nn.RegularizationFunction = null;
problem = Problem.CLASSIFICATION;
initZero = false;
hideText = false;
collectStats = false;
numHiddenLayers = 1;
hiddenLayerControls: any[] = [];
Expand Down

0 comments on commit 11ea768

Please sign in to comment.