Exporting histograms from TensorFlow

histogram_blog

Lately I have been working a lot with Google’s TensorFlow library for machine learning. It has a really nice tool for data visualisation, TensorBoard, which can be very useful to understand how the training and evaluation of your model is working. One small bottleneck though is that it has a built-in tool for data export that only works for the scalar functions and unfortunately not for more complex visualisation means like histograms. I find especially the histograms to be particularly useful because they show how is your probability distribution narrowing as a function of learning steps, so it is a really useful figure of merit for understanding the training/evaluation. This is also the reason why I thought it would be useful to export the histograms and customise them for example in Matlab. I would like to share here the code for exporting the histograms from the TensorFlow model. Hopefully you will find it useful! You can download it here.


 

Screen Shot 2017-09-27 at 00.00.10.png

Saas-Fee

Saas-Fee is a wonderful car-free Swiss village with the proximity to a glacier and several 4000 peaks. I just took a short holiday there and here is a few pictures. If you are ever going to hike there I can especially recommend going to Spielboden and Langflüh, from where you have excellent view of the glacier, and walking from Felskinn to Plattjen, which starts way above the snow line and is one of the most beautiful hikes I have ever went to.