dgschwend / netscope

Neural network visualizer and analyzer
http://dgschwend.github.io/netscope
164 stars 72 forks source link

Add Layer Visualizations #1

Closed dgschwend closed 8 years ago

dgschwend commented 8 years ago

Suggested by @Grabber in DeepScale/SqueezeNet Issue #16 "regarding performance improvement for AlexNet"

@dgschwend That is a must have tool, I was exactly thinking about an oscilloscope for CNNs! Do you think your tool could generate visual representation about layers too?

On Darknet framework there is a feature called visualize that generates visual representations of the filters, layer by layer, take a look:

3b8e3a56-481b-11e6-92ab-558113a48612

It would be useful to have this kind of visual representation rendered on the menu that is shown when you pass the mouse over the network layer.

f0663dc0-482f-11e6-98d3-aaabc1c113af

dgschwend commented 8 years ago

Nice idea, I'd love to have more intuitive ways of visualizing and inspecting CNNs. However, this would require quite fundamental changes. Right now, the tools just parses the ".prototxt" file, which contains the network structure. Layer visualizations would need to come from the weights saved in the ".caffemodel" file, and activations/feature maps would need to come from a forward-run using caffe itself. Both of these information sources are currently not available to the netscope script. Furthermore, my use case for netscope was mainly the design and modification of CNN structure. The weights would be available only after training. Finally, if you're looking simply looking for visualizations, I'd recommend checking out NVIDIA/digits. After training the network (or loading a pre-trained network, which can be done by training for 0 epochs), you can check out all the layer weights and the activations for a certain input image.