-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make the neural network introduction its own section (#5)
* make the neural network introduction its own section * finished through CoDaS-HEP lesson 1
- Loading branch information
Showing
18 changed files
with
1,944 additions
and
447 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
jupytext: | ||
cell_metadata_filter: -all | ||
formats: md:myst | ||
text_representation: | ||
extension: .md | ||
format_name: myst | ||
format_version: 0.13 | ||
jupytext_version: 1.16.4 | ||
kernelspec: | ||
display_name: Python 3 (ipykernel) | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
# Exercise 1: TensorFlow Playground | ||
|
||
+++ | ||
|
||
For this exercise, go to <a href="https://playground.tensorflow.org/#activation=sigmoid&batchSize=10&dataset=gauss®Dataset=reg-plane&learningRate=0.03®ularizationRate=0&noise=0&networkShape=&seed=0.55534&showTestData=false&discretize=false&percTrainData=50&x=true&y=true&xTimesY=false&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=classification&initZero=false&hideText=false" target="_blank">playground.tensorflow.org</a> by clicking on the image below. | ||
|
||
+++ | ||
|
||
<a href="https://playground.tensorflow.org/#activation=sigmoid&batchSize=10&dataset=gauss®Dataset=reg-plane&learningRate=0.03®ularizationRate=0&noise=0&networkShape=&seed=0.55534&showTestData=false&discretize=false&percTrainData=50&x=true&y=true&xTimesY=false&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=classification&initZero=false&hideText=false" target="_blank"><img src="tensorflow-playground.png" width="100%"></a> | ||
|
||
+++ | ||
|
||
Press the "play" button to start training the network. The colored background (the model) should progressively become a better fit to the points (the training data). | ||
|
||
Next, try each of these exercises: | ||
|
||
1. Increase the noise in the data and fit it again. | ||
|
||
![](img/tensorflow-playground-noise.png) | ||
|
||
2. Select the "circle" dataset and attempt to fit it again. Can you fit it if you add hidden layers? What's the smallest number of hidden layers (and nodes) you need to fit the data? | ||
|
||
![](img/tensorflow-playground-dataset-circle.png) | ||
|
||
3. Do the same for the "xor" dataset. | ||
|
||
![](img/tensorflow-playground-dataset-xor.png) | ||
|
||
4. Do the same for the "spiral" dataset. | ||
|
||
![](img/tensorflow-playground-dataset-spiral.png) | ||
|
||
5. What if you use different features instead? Repeat 2‒4 using features instead of hidden layers. | ||
|
||
![](img/tensorflow-playground-features.png) | ||
|
||
6. What about different activation functions? | ||
|
||
![](img/tensorflow-playground-activation.png) | ||
|
||
7. We'll discuss regularization later, but play with it and see if you can figure out what it does. Try making a neural network with too many layers and nodes for a simple problem (such as the linearly separable blobs) and turn on L1 regularization with a mid-range regularization rate. What happens if you let it run for a while? | ||
|
||
![](img/tensorflow-playground-regularization.png) | ||
|
||
Other things to explore: the 2 regression problems, | ||
|
||
![](img/tensorflow-playground-regression.png) | ||
|
||
the learning rate, | ||
|
||
![](img/tensorflow-playground-learning-rate.png) | ||
|
||
and the batch size, | ||
|
||
![](img/tensorflow-playground-batch-size.png) | ||
|
||
Have fun! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,012 changes: 1,012 additions & 0 deletions
1,012
deep-learning-intro-for-hep/img/boltzmann-machine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.8 KB
deep-learning-intro-for-hep/img/tensorflow-playground-dataset-circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.4 KB
deep-learning-intro-for-hep/img/tensorflow-playground-dataset-spiral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.1 KB
deep-learning-intro-for-hep/img/tensorflow-playground-dataset-xor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.5 KB
deep-learning-intro-for-hep/img/tensorflow-playground-learning-rate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.3 KB
deep-learning-intro-for-hep/img/tensorflow-playground-regularization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.