Visualizing Deep Learning with Plotly

Jeff Lai
1 min readJun 29, 2017

Having been working with keras for a while, I think it may be fun to do some simple visualization with my model’s result. By visualization, I merely mean the accuracy and loss (sorry for the misleading title). However, I only had experience with matplotlib before, and I want an interactive graph instead. Since I mainly(only) code in Python, my coworker recommends plotly to me. I checked out their website projects and I decided to give it a shot.

Below is an example of what my model’s architecture looks like. Keras has a function to display the model summary, and it comes in handy for checking input-output dimensions (especially for CNN). The example model below took me about 17 hours to train with GPU.

I pip the training output to a textfile, then parse it and write it to excel with this function. I am using plotly’s cloud service instead of plotting it offline for simplicity. Therefore, I just need to upload the excel file and tweak some parameters to make it pretty. Below are three results visualized from 2 different models. Overall, plotly is pretty, interactive, and I would definitely use it again :)

https://plot.ly/~jefflai108/1/

https://plot.ly/~jefflai108/3/

https://plot.ly/~jefflai108/5/

--

--