deeplift icon indicating copy to clipboard operation
deeplift copied to clipboard

deepLIFT with Merge output layer

Open tuln128 opened this issue 5 years ago • 1 comments

Hi Avanti, Thanks for your amazing work on deepLIFT. Currently, I have problem using deepLIFT with a Keras model using a Minimum layer, which pulls computation from K separated paths, as output (code sample is as following): ... minOutput = Minimum()([path_1,...,path_K]) model = Model(inputs=inputMatrix, outputs=minOutput)

It seems that deepLIFT does not support models with merged output layer yet (please correct me if I am wrong). In such case, is there any way to work around the problem?

Thank you very much in advance.

Best,

tuln128 avatar Feb 22 '19 06:02 tuln128

Hi, very sorry I missed this issue for some reason. For anyone coming across this issue in the present: yes, it's true that the current deeplift implementation doesn't support this layer. My recommendation would be to explore the alternative implementations of the DeepLIFT, which I discuss in the FAQ - the only downside of these alternative implementations is that they don't support the RevealCancel rule: https://github.com/kundajelab/deeplift#my-model-architecture-is-not-supported-by-this-deeplift-implementation-what-should-i-do

I probably don't have bandwidth to keep adding features to the core deeplift code base as I've actually switched fields to work in Earth System Science - however, if someone is keen to use the RevealCancel rule but their particular architecture is not supported in this codebase, I would be happy to provide guidance on how to add the required layer to this codebase.

AvantiShri avatar Oct 23 '20 07:10 AvantiShri