raghakot / keras-vis

Neural network visualization toolkit for keras
https://raghakot.github.io/keras-vis
MIT License
2.97k stars 664 forks source link

Support: Multi-inputs model #128

Closed keisen closed 5 years ago

keisen commented 5 years ago

@raghakot , Please review this PR!

Details:

Please refer to https://github.com/raghakot/keras-vis/issues/33#issuecomment-412785876 .

Tasks:

keisen commented 5 years ago

Travis-ci is occured build error but its cause has been fixed in PR https://github.com/raghakot/keras-vis/pull/122 .

raghakot commented 5 years ago

Looking into this

keisen commented 5 years ago

Lets limit wrt_tensor to be a single tensor for all input_tensors for now.

Thank you for reviewing, I agree it.

I'm going to improve them, that it changes input_indices to input_index and wrt_tensors to wrt_tensor. (But I think, input_indices is good idea, so, in future, it should be supported.)

keisen commented 5 years ago

Hi @raghakot.

For now, I close this PR. I really appreciate what you have reviewed, but I'm sorry I couldn't make good use of it.

I think, to get correct results of ActivationMaximization in multipul-input-model case, we need what the Optimizer has to support multiple wrt_tensors at least. (Unspecified inputs by wrt_tensor are kept the noise if we support only single wrt_tensor. I think, the noise will have a negative effect on the calculation result of ActivationMaximization.)

The patch of this PR is complex such as you said. This is the result of adding the feature with full backward compatibility maintained. In future, maybe, keras-vis will be redesigned by us to realize more funtions and usability. I think, it's good that the support of multi-inputs-model (i.e., #33 ) will be realized at that time.

wstang35 commented 5 years ago

Hi @keisen

Does keras_vis support multi-inputs-model now?

keisen commented 5 years ago

Hi @wstang35 . Sorry, keras-vis have not supported it yet. I have incomplete implementation developed for this PR. (It is able to be working but perhups may have some bugs.)

https://github.com/keisen/keras-vis/tree/features/%2333

I will help you if you use it!