What is TensorFlow Playground?
Tensorflow playground is a neural network playground. Which is an interactive web app that built on ds3.js. It is an educational visualization platform for a layman. So, they can easily understand the concepts of deep learning like
- Creating Neural networks
- Running Neural networks
- Understand the Working of Neural networks.
- Playing with neural network hyperparameters like learning rate, activation function, epochs.
- Get results
Tensorflow playground provides a great platform that allows users who are not familiar with high-level math and coding to experiment with neural network for deep learning. It is created for understanding the core idea behind the neural network.
Features of TensorFlow Playground
There is mainly 10 term that plays an important role in Tensorflow playground.
The Playground provides mainly 6 different types of datasets
Classification: Circle, Exclusive or, Gaussian, spiral.
Regression: Plane, Multi Gaussian.
Small circle points are represented as data points that correspond to Positive (+) and Negative (-). Positive represented by blue, Negative represented by orange. These same colors are used in representing Data, Neuron, Weight values.
2) The Ratio of Train and Test Data, Noise, Batch Size
Splitting ration of data into Train and Test data. Add noise to your data for better training of the model. Batch means a set of examples used in one iteration.
4.5 (2,280 ratings)
It provides 7 features or inputs– X1, X2, Squares of X1X2, Product of X1X2 and sin of X1X2. Select and Deselect the features to understand which feature is more important, It plays a major role in feature engineering.
4) Hidden Layers
Increase and decrease the hidden layer according to your inputs or data. Also can select the neurons for each hidden layer and experiment with different hidden layers and neurons, check how the results are changing.
Epoch is one complete iteration through the data set. When you select the play button to start the network. When the network is started no. epochs will keep increasing.
The Reset button will reset the whole network.
6) Learning Rate
The Learning rate is a hyperparameter that is used to speed up the procedure to get local optima.
7) Activation Function
An Activation function is applied to between two layers of any neural network. It is responsible for activating the neurons in the network.
4 types of activation function – ReLU, Tanh, Sigmoid, Linear
There are two types of Regularization L1 and L2. Which is used to reducing the overfitting of the model? Model is overfitted when it can only work well with the single dataset when the dataset is changed it perform very poor on that data.
9) Problem Type
Tensorflow playground handle two types of problems: Classifications, Regression
Check the model performance after the training the neural network. Observe the Test loss and Training loss of the model.
Let’s do a classification problem on the Tensorflow playground.
Steps how to play in this neural network playground:
- Select the Exclusive OR Data Set Classification problem.
- Set Ratio of training and test data to 60% – which means we have 60% train data and 40% testing data.
- Noise is added to 5 and increase it and do some experiment with it, check how the output losses are changing and select the batch size to 10.
- First Select simple features like X1 and X2 then note down the output losses
(Training loss:-0.004, Test loss: – 0.002, steps:-255)
Now add the third feature product of (X1X2) then observe the Losses.
(Training loss:-0.001, Test loss: – 0.001, steps:-102)
This how you can understand the value of features, how to get good results in minimum steps.
- Set the learning rate to 0.03, also checks how the learning rate plays an important role in training a neural network.
- Activation function as Tanh, for basic neural networks there are no requirements for regularization and regularization rate. There is no need the change the problem type.
But do not forget to play with regression, so you have a clear idea about regression.
- Select 2 hidden layers. Set 4 neurons for the first hidden layer and 2 neurons for the second hidden layer then followed by the output.
- Starting from the first layer the weights are passed on to the first hidden layer which contains output from one neuron, second hidden layer output is mixed with different weights. Weights are represented by the thickness of the lines.
- Then the final output will contain the Train and Test loss of the neural network.
- The output has classified the data point correctly as shown in the below image.
Make some changes and check how it affects other factors. Observe the Train and Test loss after every change.
How Parameters Play an Important Role to get Better Accuracy of the Model?
- Ratio Train and Test: Getting a good ratio of the train test data set will give good performance of our model.
- Feature Selection: By exploring and selecting different kinds of features, find your right features for the model.
- Hidden Layer Selection: Select hidden layer base on your input size, but for small dataset 2 hidden layer works perfectly. So make some changes in the hidden layer and also make some observations on it. You will get a better idea of how the hidden layer plays a role in it.
- Learning Rate: The Most important hyperparameter for the model. Large learning rates can result in unstable training of model and a tiny rate result in failure of training. So select the learning rate that perfectly fits your model and give you the best output.
Above mentioned 4 terms play an important role in training a good neural network. So try to play with it in Tensorflow Playground
Tensorflow playground is a really great platform to learn about neural networks, It trains a neural network by just clicking on the play button and the whole network will be trained over your browser, and let you check that how the network output is changing.
This is a guide to the Tensorflow playground. Here we discuss What is Tensorflow Playground? Features of Tensorflow Playground include Data, Hidden layers, Epoch, Learning Function, etc. You may also look at the following articles to learn more –