infocusp / tf_cnnvis

CNN visualization tool in TensorFlow
MIT License
780 stars 208 forks source link

Deepdream for Mobilenet V2 COCO model #58

Closed endeepak closed 6 years ago

endeepak commented 6 years ago

I'm trying deepdream_visualization on ssdlite_mobilenet_v2_coco model by modifying the tf_cnnvis_Example3.ipynb. I have set the input layer to FeatureExtractor/MobilenetV2/MobilenetV2/input and visualisation layer to import/FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128/BatchNorm/batchnorm/add_1

Given these layers, deepdream_visualization generated uninterpretable image as shown below image_1

I'm not sure if I have chosen the correct layers for input and visualization. Any pointers on this would be very useful

Thanks

endeepak commented 6 years ago

Modified notebook for ssdlite_mobilenet_v2_coco model can be found in https://github.com/endeepak/tf_cnnvis/blob/master/examples/tf_cnnvis_Example3.ipynb

Changes can be found in commit https://github.com/endeepak/tf_cnnvis/commit/96d7a452de40fd28aa743d059bd2e0d0af18a6e2#diff-3d2ac2a68d31d5613fd599622217b371

endeepak commented 6 years ago

I was able to figure out the correct input and output layers using tools/graph_transforms:summarize_graph from tensorflow docs. I'm currently stuck with issue https://github.com/InFoCusp/tf_cnnvis/issues/26

Layer name changes can be found here https://github.com/endeepak/tf_cnnvis/commit/93d4d2ed1f72158baa4c72857e7d4db091ebdc46

falaktheoptimist commented 6 years ago

Hi @endeepak Sorry for the late reply. Thanks to your model, we were able to figure out the cause for the NoneType error in issue #26. It occurs when one of the layers/ operations in the model does not have a gradient defined for it. In this case, forward pass and hence activation visualization would work fine but back propagation or de convolution would not work and hence gives the NoneType error.

falaktheoptimist commented 6 years ago

Closing this for lack of activity. Reopen if needed.