chr5tphr / zennit

Zennit is a high-level framework in Python using PyTorch for explaining/exploring neural networks using attribution methods like LRP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core/Composite: Simplify Composite.context

chr5tphr opened this issue · comments

Composite.context can be implemented slimmer/simpler using contextlib.contextmanager.
Furthermore, instead of calling Composite.context, the same functionality could be implemented as Composite.__call__, as the context is the main functionality, and this would remove a little bit of overhead, although .context may be more descriptive.