kundajelab / deeplift

Public facing deeplift repo
MIT License
815 stars 162 forks source link

support for keras LocallyConnected2D layer #79

Open isukrit opened 5 years ago

isukrit commented 5 years ago

Hi, is there support for Keras LocallyConnected2D and LocallyConnected1D layers, which are basically CNN filters with different weights for each patch of the image.

AvantiShri commented 3 years ago

Hi, very sorry I missed this issue for some reason. For anyone coming across this issue in the present: the current deeplift implementation unfortunately doesn't support this layer. My recommendation would be to explore the alternative implementations of the DeepLIFT, which I list in the FAQ: https://github.com/kundajelab/deeplift#my-model-architecture-is-not-supported-by-this-deeplift-implementation-what-should-i-do. The the only downside of these alternative implementations is that they don't support the RevealCancel rule. Let me know if you run into issues with those alternative implementations (it's much easier to add features to them than it is to add features to this codebase, as the alternative implementations work by overriding tensorflow gradient operators).