天天看點

深度神經網絡可視化工具集錦

  tensorboard:tensorflow內建可視化工具

tensorboard 涉及到的運算,通常是在訓練龐大的深度神經網絡中出現的複雜而又難以了解的運算。

為了更友善 tensorflow 程式的了解、調試與優化,google釋出了一套叫做 tensorboard 的可視化工具。你可以用 tensorboard 來展現你的 tensorflow 圖像,繪制圖像生成的定量名額圖以及附加資料。

深度神經網絡可視化工具集錦

輸入下面的指令來啟動tensorboard:

這裡的參數 logdir 指向 summarywriter 序列化資料的存儲路徑。如果logdir目錄的子目錄中包含另一次運作時的資料,那麼 tensorboard 會展示所有運作的資料。一旦 tensorboard 開始運作,你可以通過在浏覽器中輸入 localhost:6006 來檢視 tensorboard。進入 tensorboard 的界面時,你會在右上角看到導航頁籤,每一個頁籤将展現一組可視化的序列化資料集 。對于你檢視的每一個頁籤,如果 tensorboard 中沒有資料與這個頁籤相關的話,則會顯示一條提示資訊訓示你如何序列化相關資料。

tensorflow 圖表計算強大而又複雜,圖表可視化在了解和調試時顯得非常有幫助。 下面是一個運作時的可式化例子:

深度神經網絡可視化工具集錦

更多詳細内容參考:

“a web-based tool for visualizing neural network architectures (or technically, any directed acyclic graph). it currently supports caffe’s prototxt format.”

深度神經網絡可視化工具集錦
深度神經網絡可視化工具集錦

netscope給出的幾個常見cnn網絡結構示例:

python/draw_net.py,這個檔案,就是用來繪制網絡模型的,也就是将網絡模型由prototxt變成一張圖檔。

在繪制之前,需要先安裝兩個庫

注意,這裡用的是apt-get來安裝,而不是pip。

用的是pip來安裝,而不是apt-get。

安裝好了,就可以調用腳本來繪制圖檔了。

draw_net.py執行的時候帶三個參數

第一個參數:網絡模型的prototxt檔案;

第二個參數:儲存的圖檔路徑及名字;

第二個參數:- - rankdir = x,x 有四種選項,分别是lr, rl, tb, bt 。用來表示網絡的方向,分别是從左到右,從右到左,從上到小,從下到上。預設為lr。

例:繪制lenet模型

深度神經網絡可視化工具集錦

參考閱讀:

<a href="http://blog.csdn.net/10km/article/details/52713027" target="_blank">netscope:支援caffe的神經網絡結構線上可視化工具</a>

<a href="http://www.cnblogs.com/denny402/p/5106764.html" target="_blank">caffe學習系列(18): 繪制網絡模型</a>

<a href="http://blog.csdn.net/solomon1558/article/details/53144606" target="_blank">caffe學習系列——工具篇:神經網絡模型結構可視化</a>

<a href="http://deeplearningongpu.readthedocs.io/en/latest/stage_3.html" target="_blank">深度網絡的設計與可視化工具</a>

deep playground is an interactive visualization of neural networks, written in typescript using d3.js.

深度神經網絡可視化工具集錦

convnetjs is a javascript library for training deep learning models (neural networks) entirely in your browser. open a tab and you’re training. no software requirements, no compilers, no installations, no gpus, no sweat.

深度神經網絡可視化工具集錦

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/mnist.html" target="_blank">convolutional neural network on mnist digits</a>

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/cifar10.html" target="_blank">convolutional neural network on cifar-10</a>

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/classify2d.html" target="_blank">toy 2d data</a>

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/regression.html" target="_blank">toy 1d regression</a>

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/autoencoder.html" target="_blank">training an autoencoder on mnist digits</a>

<a href="http://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html" target="_blank">deep q learning reinforcement learning demo</a>

<a href="http://cs.stanford.edu/~karpathy/convnetjs/demo/image_regression.html" target="_blank">image regression (“painting”)</a>

<a href="http://cs.stanford.edu/people/karpathy/convnetjs/demo/trainers.html" target="_blank">comparison of sgd/adagrad/adadelta on mnist</a>

深度神經網絡可視化工具集錦

具體參見:能幫你更好了解分析深度卷積神經網絡,今天要解讀的是一款新型可視化工具——cnnvis,看完就能用!

摘要: 深度卷積神經網絡(cnns)在許多模式識别任務中取得了很大的性能突破, 然而高品質深度模型的發展依賴于大量的嘗試,這是由于沒有很好的了解深度模型是怎麼工作的,在本文中,提出了一個可視化分析系統cnnvis,幫助機器學習專家更好的了解、分析、設計深度卷積神經網絡。

深度神經網絡可視化工具集錦

====================================分割線================================

本文作者:軍君