infocusp / tf_cnnvis

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

Visualisation for CIFAR-10 Tensorflow implementation #74

Open gioCanelita opened 6 years ago

gioCanelita commented 6 years ago

Hi,

I am relatively new to tensorflow. I am trying to use your visualisation functions, but I am struggling with the input dictionary. The CIFAR-10 tensorflow implementation does not have an input placeholder. Would I need to modify the code by adding this input, retrain my model and then try the visualisation? Ay guidance on this will be very much appreciated. The code I am using is -> https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10_train.py

falaktheoptimist commented 6 years ago

If you look at https://github.com/tensorflow/models/blob/master/tutorials/image/cifar10/cifar10.py - it has images and labels already defined. You will need to find the exact name of the input tensor from the graph and then using the tf.get_tensor_by_name you can get the input tensor. This should be specified as the input in the case of cifar10 for using tf_cnnvis. Hope this helps.

amers185 commented 6 years ago

Hello Falak! Thank you for doing such great work. I am an undergraduate student. My partner and I are interested in using your implementation for Mathew Zeiler paper. Specifically, on a set of images, we want to examine which part of pixel area in the original image contributes more toward the final classification probability, by occluding parts of the image for different positions. To that end, we have our own set of images. I was wondering how can we run your code on our images? Further, when I run your examples. Only example 2 seems to work. Others say that a file is missing. Thank you so much.