-
Notifications
You must be signed in to change notification settings - Fork 638
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
MeepJaxWrapper AxisError when computing the gradient of a objective dependent of a single frequency defined MeepJaxWrapper object #2246
Labels
Comments
Can you please provide the full stack trace? |
|
Thanks. This looks like a bug in the |
Hmm this may be an artifact from #1855. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jax meep simulation wrapper object
MeepJaxWrapper
works fine when it's initialized with more than one frequency set in itsfrequency
argument. But it's not when the list uses a single frequency, e.g.frequencies = [fcen]
An example to reproduce the error, that I adapted from one of the meep adjoint tutorials for simplicity, can be found here:
The script returns an
AxisError: axis 1 is out of bounds for array of dimension 1
whengrad_loss = grad(loss)(x)
is called.And it doesn't if for example the
frequencies
list contains more than one frequency, e.g:frequencies = [fcen, 0.5*fcen]
The text was updated successfully, but these errors were encountered: