f-dangel / curvlinops

scipy linear operators for the Hessian, Fisher/GGN, and more in PyTorch
https://curvlinops.readthedocs.io/en/latest/
MIT License
17 stars 5 forks source link

[REF] Create shared parent classes for `KFACLinearOperator` and `KFACInverseLinearOperator` #126

Open runame opened 2 weeks ago

runame commented 2 weeks ago

I think we should at some point refactor KFACLinearOperator and KFACInverseLinearOperator to inherit from KroneckerProductLinearOperator and EigendecomposedKroneckerProductLinearOperator (or similar) classes since torch_matmat and other methods can be shared. Also, currently KFACInverseLinearOperator doesn't support trace, det, etc. properties which can also be shared.