Comments (19)
I need to update the API. There are a couple of options.
- You want to visualize attention over all inputs or input at a specific index.
- Same could be done for guided backprop as well.
I guess it is reasonable to use add an additional param input_indices
to various visualize methods that defaults to 0, take a single value or array of indices. Does that sound reasonable?
I am making this change unless you have any other use-cases to add.
from keras-vis.
Hi,
I'm trying to use visualize_saliency on a network that takes two inputs: one is a 3D image and the other is a 1D vector. I'd like to visualize saliency on the 3D image. I'm confused about the usage of the parameters 'wrt_tensor' and 'input_indices'. Could you provide an example?
In my case, the 3D image is input_1 and the 1D vector is input_2.
Thanks
from keras-vis.
Has this enhancement been implemented?
from keras-vis.
It would indeed be great to get this enhancement working. I don't mind trying to implement it myself, I just need a tiny bit more guidance than in your single post @raghakot ...
Looking to run activation maximisation for multiple inputs.
from keras-vis.
@raghakot @xangma has there been any progress regarding this issue? It would be extremely helpful. I also asked on Stackoverflow, maybe somebody came up with a hack in the meantime:
Multiple Inputs - SO
from keras-vis.
It would be great to add such a param. In my case, I am trying some mutli-view architectures and I want to get the salience map of these views so that I can explore the relations among these views.
from keras-vis.
Has anyone made progress regarding the visualization with multiple inputs?
from keras-vis.
Where would input_indices need to be included to implement this enhancement? Thanks!
from keras-vis.
Is there any update on this? Is this already implemented?
from keras-vis.
More than a year after this was asked and we still don't have an answer?? Come on guys! In raghakot comment it looked like a straightforward thing to do..! I would REALLY, REALLY appreciate it if you could modify the toolbox to allow multiple inputs. I am finishing the paper I'm gonna submit to Elsevier and I would like to cite you guys in there (@raghakot)
from keras-vis.
Hi, There.
Now, I'm challenging this matter.
Anyone, please give me a trained-model file with multiple inputs.
from keras-vis.
Hi @keisen,
https://www.dropbox.com/s/1unw41xoivrxrgh/species_keras_Resnet50_fold4_3input.zip?dl=0
Here are the trained model (with 3 inputs) and the sample images ( input 1, input 2, and input 3 )
Thank you in advance !
from keras-vis.
@KatieHYT , Thank you so, so much !
I think this work will be completed within a few days.
from keras-vis.
Hi, @KatieHYT
I don't completed this issue yet.
Now, faceing a problem of gradients calculation of Keras (or Tensorflow),
so it may take a while.
This problem is occured on nested models.
(However, if inputs of sub-model set to as inputs of root-model, It is not occured.)
so GradCAM may be that can not be calculated with your model.
from keras-vis.
Hi @keisen ,
I really appreciate your help.
Attached are the model and model architecture. Hope this will help :)
https://drive.google.com/drive/folders/1DTbVejKfglvZH4t6xPNrBlO3bDbjdH3A?usp=sharing
from keras-vis.
Hi, There.
I made the implementation for this feature.
The implementation can be to calculate multi-input model.
API specification is just @raghakot's idea ( #33 (comment) ) which the argument of visualize_*
functions was added input_indices
.
Of course, Its default value is zero, so this feature has compatibility.
Anyone, Please try this implementation.
https://github.com/keisen/keras-vis/tree/features/%2333
Please make sure of the concept and API specification of this feature.
Is this just what you imagined ?
If it isn't, I'll reimplement this feature from scratch.
PR #128
Thank you for sharing model file.
I was happy because you helped me.
But, Unfortunately, I couldn't visualized using your model, i.e., It couldn't calculate gradients.
Because your model include Lambda layer between model's input tensor and three sub-models.
Sorry, Could you try other models.
Regard.
from keras-vis.
Now, faceing a problem of gradients calculation of Keras (or Tensorflow),
Since I could not find a workaround, I gave up this problem.
Nested models don't support, because may no longer able to calculate gradients with Keras.
from keras-vis.
Thank you so so much, @keisen ! :)
from keras-vis.
Hi,
I'm trying to use visualize_saliency on a network that takes two inputs: one is a 3D image and the other is a 1D vector. I'd like to visualize saliency on the 3D image. I'm confused about the usage of the parameters 'wrt_tensor' and 'input_indices'. Could you provide an example?
In my case, the 3D image is input_1 and the 1D vector is input_2.
Thanks
I don't think it's possible. I read the source code, the input to Optimizer
is always model.input
which is a list of input tensors. The only work around will be removing one of the inputs. Though I don't know how to achieve this (should be something like to feeding a constant input to the Input tensor).
from keras-vis.
Related Issues (20)
- [question] electrode contribution in EEG input
- Is there any reason why no demo for activation maximization for resnet?
- Is the project still maintained? HOT 2
- Exact gradient values
- Memory increases and iterations slow down while using visualize_saliency
- 3D MRI Image
- How to clip the positive gradients when using visualization_cam?
- AttributeError: module 'tensorflow' has no attribute 'get_default_graph' HOT 1
- AttributeError: 'list'/integer/float object has no attribute 'build_loss' in visualize_saliency_with_losses
- ImportError: cannot import name '_Conv' from 'keras.layers.convolutional' HOT 19
- Generated Image Color
- Issue - "ImportError: cannot import name '_Conv' from 'keras.layers.convolutional'" HOT 2
- Tensorflow version? HOT 1
- Problem with custom CNN VGG16 (unsupported operand type(s) for *: 'int' and 'NoneType')
- scipy 1.5.2 ImportError: cannot import name 'imresize' HOT 3
- Cannot convert a symbolic Keras input/output to a numpy array... HOT 1
- v
- Is this also working for Faster R-CNN or Mask R-CNN?
- Why is pre-activation output used for computing vanilla saliency map?
- AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-vis.