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

Remove self.representation (and other memory intensive attributes) from portilla-simoncelli #142

Closed
kbonnen opened this issue Nov 12, 2021 · 3 comments

Comments

@kbonnen
Copy link
Collaborator

kbonnen commented Nov 12, 2021

Oh the other thing I wanted to bring up -- I thought we had decided that models shouldn't keep a self.representation lying around, so that they're more lightweight. Did I remember that correctly? If so, that will require a bit more work here, but it looks possible to me.

Originally posted by @billbrod in #96 (comment)

@kbonnen
Copy link
Collaborator Author

kbonnen commented Nov 12, 2021

We should do this. It means removing self.representation and the following attributes:

pyr: Steerable_Pyramid_Freq
The complex steerable pyramid object used to calculate the portilla-simoncelli representation
pyr_coeffs: OrderedDict
The coefficients of the complex steerable pyramid.
mag_pyr_coeffs: OrderedDict
The magnitude of the pyramid coefficients.
real_pyr_coeffs: OrderedDict
The real parts of the pyramid coefficients.
representation_scales: list
The scale for each coefficient in its vector form
representation: dictionary
A dictionary containing the Portilla-Simoncelli statistics

@billbrod
Copy link
Collaborator

billbrod commented Nov 12, 2021

I think we can keep around the pyramid (and I actually added several other pyramids), because not having to re-create them each forward pass will speed up performance (especially on GPU, otherwise we have to create pyramid and then pass to GPU, and copying to GPU takes a while). But just not their coefficients.

@billbrod
Copy link
Collaborator

Closed by #225

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