Visualizing Face Detection Model Using TensorBoard

What is TensorBoard?

This is a visualization tool that is available with Tensorflow.
But the reason this is useful is that, it has special features such as viewing your machine learning model as a conceptual graphical representation (computational graph) of nodes and edges connecting those nodes(data flows).
Further it also provides us the ability to evaluate the performance of our models in relation to desired metrics.

Accuracy:
As a rule of thumb, when you notice the accuracy stops increasing, that is the ideal number of epochs you should have usually between 1 and 10. 100 seems too much already. In every epochs steps accuracy increase.

Losses:
A scalar value that we attempt to minimize during our training of the model. The lower the loss, the closer our predictions are to the true labels. A model should be generic and must make accurate predictions on unseen data as well. For this, we monitor the losses and other metrics on validation (or dev) data and ensure that the losses don’t differ much.

This can be done in a more insightful manner by visualizing these metrics over the training time.

In this image you can show every epochs steps losses go down.

Model Images: In this model we are use face images for detection. here is some exaple of train images.

Graphs:
Here’s an example of a more complex version of a model graph being visualized by TensorFlow. TensorBoard allows us to zoom, pan, and expand elements to see more details. We can easily view a conceptual graph of our model’s structure and ensure it matches our intended design using the Graphs dashboard.
This also is quite an insight into how TensorFlow construes the model.

Histogram:
The Histograms and Distributions dashboards allow us to visualize the distribution of a tensor over time. Using these, we can monitor the weights, biases, activations, and more. histogram_freq tells tensorflow to compute the distributions after every epoch. If it is set to 0, then it won’t plot any distributions.

Conclusion:
We saw what TensorBoard is and explored some basic stuff in it. However, in this article we have covered like accuracy, losses, graphs, distributions, and model images. There are many more features in Tensorboard which can be explored. More in future articles.

Have Any Questions?