Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: GradOutHook, MergedComposite and multi-hooks #182

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chr5tphr
Copy link
Owner

  • support the use of multiple hooks by checking for tuples form Composites' module_map and registering all of them (multiple Hook instances only overwrite the results of another)
  • add HookBase as another layer of abstraction, above both Hook (which hooks over one full module) and GradOutHook (which hooks only the output of a function)
  • add GradOutHook, which can modify the gradient at the output of a module
  • add MultiComposite as a parent to MixedComposite
  • add MergedComposite, inheriting from MultiComposite, which merges rules returned from composites for a multi-hook setting rather than using the first hook that applies

Todo:

  • finish functionality
  • finish docstrings
  • extend documentation (How-To etc.)
  • write tests

- support the use of multiple hooks by checking for tuples form
  Composites' module_map and registering all of them (multiple Hook
  instances only overwrite the results of another)
- add HookBase as another layer of abstraction, above both Hook (which
  hooks over one full module) and GradOutHook (which hooks only the
  output of a function)
- add GradOutHook, which can modify the gradient at the output of a
  module
- add MultiComposite as a parent to MixedComposite
- add MergedComposite, inheriting from MultiComposite, which merges
  rules returned from composites for a multi-hook setting rather than
  using the first hook that applies

Todo:

- finish functionality
- finish docstrings
- extend documentation (How-To etc.)
- write tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant