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

How to generate single class based feature #88

Open
robonetphy opened this issue Dec 3, 2020 · 2 comments
Open

How to generate single class based feature #88

robonetphy opened this issue Dec 3, 2020 · 2 comments

Comments

@robonetphy
Copy link

I have similar network and I want to generate single class based feature as shown in readme.md
But in document using deepdream you are only visualizing layer not one class?
So how we extract one class based feature?

So please guide us for our research ....🙏

@BhagyeshVikani
Copy link
Member

BhagyeshVikani commented Dec 4, 2020

Hello @robonetphy

You can specify layer and the class index for which you want to generate deepdream visualization.

is_success = deepdream_visualization(sess_graph_path = tf.get_default_graph(), value_feed_dict = {t_input : im}, layer=layer, classes = [1, 2, 3, 4, 5], path_logdir=os.path.join("Log","Inception5"), path_outdir=os.path.join("Output","Inception5"))

Above example will generate 5 deepdream visualizations each for different classes(1, 2, 3, 4, 5). And 'layer' should be name of the last layer/last operation.

Example Notebook: tf_cnnvis_Example3

@robonetphy
Copy link
Author

Thank you very much.this will help a lot to achieve our goal.

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

No branches or pull requests

2 participants