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

Using a Custom H Function #5

Closed
malekinho8 opened this issue Jun 28, 2022 · 1 comment
Closed

Using a Custom H Function #5

malekinho8 opened this issue Jun 28, 2022 · 1 comment

Comments

@malekinho8
Copy link

Hello, thank you Bahjat very much for uploading this code and making it so easy to reproduce your group's results. It is truly much appreciated. I had a question regarding the possibility for defining a new H function class (in the svd_replacement.py code), and was hoping you might be able to offer some insight. What is the general thought process you followed in order to define the functions for Vt, V, U, Ut, and the singulars in this code? If I wanted to do it for another linear function (i.e. only super-resolve right half of image or specific pixel region within image), how could I do this? I have defined the H-matrix for the operation I want to do, but it is not clear to me how to define the class so that it works properly with the rest of the code. Would you be able to offer any useful resources or guidelines to follow for help with this? Thank you!

@bahjat-kawar
Copy link
Owner

Hello,
Thank you for your interest in our work.
You can definitely incorporate any matrix H that you want. You can use the GeneralH class that we provide if your images are small enough or you have a large enough GPU. Otherwise, you will need to implement the SVD decomposition of your matrix H in an efficient way. For example, the function V(x) should return the multiplication of the V matrix by the (batched) input vector x. It should do so in a memory-efficient way.
Each matrix may have its own properties that allow such an efficient implementation. I am sure that something similar to the examples you suggested can be implemented efficiently, similar to the matrices that we used. For a full explanation, please check out the appendices of our paper.
Good luck!

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

No branches or pull requests

2 participants