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

Merge hooks that save layer inputs and compute H_K, H_C #64

Closed
f-dangel opened this issue Nov 3, 2023 · 0 comments
Closed

Merge hooks that save layer inputs and compute H_K, H_C #64

f-dangel opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@f-dangel
Copy link
Owner

f-dangel commented Nov 3, 2023

After merging #63, the accumulation of H_K, H_C will be done with a tensor hook that gets installed onto the output of a layer. We also have a second hook which saves the input to a layer into a .inputs dictionary which acts like a global variable.

Proposal: Instead of saving the input to a layer into SINGD.layers, directly pass it to the tensor hook that computes H_K, H_C. This

  1. Eliminates a 'global' variable (SINGD.inputs)
  2. Reduces the number of hooks (and related boilerplate code like checking if .step matches the update frequency) from 2 to 1
@f-dangel f-dangel added the enhancement New feature or request label Nov 3, 2023
@f-dangel f-dangel self-assigned this Nov 3, 2023
@f-dangel f-dangel closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant