-
Notifications
You must be signed in to change notification settings - Fork 10
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
Power iteration algorithm is now generic to any linear operator #73
Conversation
97dcebd
to
54a2725
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the comment about non square matrices, otherwise LGTM
To be checked: it seems that it has been resolved for convolution but may also be applicable for dense layer (u of min size in kernel.shape, and use kernel or kernel transpose) |
99531c7
to
ec61e65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for merge once rebasing is done.
The function `power_iteration()` is now generic to any linear operator. A linear operator function and its adjoint must be passed as arguments. The maximum singular vector is returned. Note that this commit is atomic but is part of larger modifications. It won't pass the tests as is.
The function `spectral_normalization()` is now based on the generic power iteration function.
The function spectral_normalization_conv() now uses the generic power iteration. Unlike spectral normalization for matrices, a get_convolution_operators() function is introduced because it can be required in some future operations.
Setting the axis for normalization is useful to handle depthwise convolution filterwise
562512a
to
f09c2be
Compare
Rebased on master |
In order to easily handle power iteration computations for future new linear operators (e.g. depthwise convolution), the power iteration algorithm is made generic: