Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepdream issue #71

Open
ishwara-bhat opened this issue Oct 10, 2018 · 1 comment
Open

deepdream issue #71

ishwara-bhat opened this issue Oct 10, 2018 · 1 comment

Comments

@ishwara-bhat
Copy link

ishwara-bhat commented Oct 10, 2018

Hi,
I got activation_visualization running. But deepdream has error at _write_deepdream().
is_success = activation_visualization(sess_graph_path = self.session, value_feed_dict = {self.input_placeholder : im},
layers=layers, path_logdir=os.path.join("Log","MyModelfromMeta"),
path_outdir=os.path.join("Output","MyModelfromMeta"))

But the deepdream_visualization has error. I am using tensorflow 1.10. (I got few deprecation warnings on

is_success = deepdream_visualization(sess_graph_path = self.session, value_feed_dict ={self.input_placeholder:im}, layer="softmax_tensor",
classes = ['label1', 'label2', 'label3'], input_tensor=None, path_logdir='./Log', path_outdir='./Output')

script: tf_cnnvis\utils.py line 195. _write_deepdream.

imsave(os.path.join(path_out, "image_%d.png" % (units[(i * images[i].shape[0]) + j + k])), img_save, format = "png")

TypeError: %d format: a number is required, not str

Deprecation warnings for utils.py 👎
calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.
Instructions for updating:
keep_dims is deprecated, use keepdims instead
Traceback

Thanks in advance,
Ishwar

@falaktheoptimist
Copy link
Member

Hi!
You need to pass in the class numbers as list of integers - so in the above case, the input would be something like classes=[0,1,2]. Doing this should resolve your issue.
Also, thank you for bringing this to our notice- we'll update the documentation a bit and also add a check for this in the code.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants