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.