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

Support KFAC for >2d model outputs #62

Merged
merged 6 commits into from
Jan 11, 2024
Merged

Support KFAC for >2d model outputs #62

merged 6 commits into from
Jan 11, 2024

Conversation

runame
Copy link
Collaborator

@runame runame commented Jan 9, 2024

Resolves #60.

This implements K-FAC-expand for linear layers with >2d inputs. Will address #50 in a follow-up PR. Also, I already added the loss_average keyword for the correct scaling of the gradient covariance.

@runame runame added the enhancement New feature or request label Jan 9, 2024
@runame runame requested a review from f-dangel January 9, 2024 15:15
@runame runame linked an issue Jan 9, 2024 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jan 9, 2024

Pull Request Test Coverage Report for Build 7488467997

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.5%) to 88.079%

Totals Coverage Status
Change from base Build 6813842617: -4.5%
Covered Lines: 761
Relevant Lines: 864

💛 - Coveralls

Copy link
Owner

@f-dangel f-dangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to take a look at the test files but feel free to start discussing the points.

curvlinops/kfac.py Outdated Show resolved Hide resolved
curvlinops/kfac.py Show resolved Hide resolved
curvlinops/kfac.py Show resolved Hide resolved
test/utils.py Outdated Show resolved Hide resolved
test/utils.py Outdated Show resolved Hide resolved
Copy link
Owner

@f-dangel f-dangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also had a look at the tests.

test/test_kfac.py Outdated Show resolved Hide resolved
test/test_kfac.py Outdated Show resolved Hide resolved
Copy link
Owner

@f-dangel f-dangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go ahead and squash-merge after addressing or arguing against my remaining comment. Looks great!

curvlinops/kfac.py Outdated Show resolved Hide resolved
@runame runame merged commit 1abed46 into development Jan 11, 2024
12 checks passed
@runame runame deleted the high-dim-outputs branch January 11, 2024 12:08
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

Successfully merging this pull request may close these issues.

Support >2d model outputs for KFAC with type-2 Fisher
3 participants