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

nn.compact vs setup for holoscope #115

Open
schneidermc opened this issue May 24, 2024 · 1 comment
Open

nn.compact vs setup for holoscope #115

schneidermc opened this issue May 24, 2024 · 1 comment
Assignees

Comments

@schneidermc
Copy link
Contributor

In the holoscope example, trying to get the psf of the Holoscope class via
psf = holoscope.apply({"params": params, "state": state}, 0, method=holoscope.psf, rngs={"noise": key}).intensity.squeeze()
gives the following error:
AssignSubModuleError: Submodule ObjectivePointSource must be defined in 'setup()' or in a method wrapped in '@compact'

@diptodip
Copy link
Collaborator

Can you try with method=Holoscope.psf? But either way the Holoscope class in that example could definitely be improved if we make the psf method just use functions instead of elements. I'll get on that.

@diptodip diptodip self-assigned this May 25, 2024
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