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

Introduce dimsd in all operators #331

Closed
cako opened this issue Feb 13, 2022 · 1 comment
Closed

Introduce dimsd in all operators #331

cako opened this issue Feb 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@cako
Copy link
Collaborator

cako commented Feb 13, 2022

Motivation

Many operators change the shape/size of the output. This becomes very hard to keep track of unless the user is very comfortable using that specific operator. Here we propose introducing a dimsd attribute to all operators which take dims. Whereas dims refers to the shape of the "model" array (input to forward) prior to flattening, dimsd would refer to the shape of "data" array (input to adjoint). This way, the user could always rely on the following code pattern for an operator Op acting on some dimensions of an N-dimensional array:

y = (Op @ x.ravel()).reshape(Op.dimsd)
x = (Op.H @ y.ravel()).reshape(Op.dims)

Definition of done

  • All operators which have dims should also have dimsd.
  • Retire old ad-hoc names like dims_fft in operators which used other attributes to rely on this functionality.
@cako cako added the enhancement New feature or request label Feb 13, 2022
@cako
Copy link
Collaborator Author

cako commented Mar 13, 2022

Closed by #347

@cako cako closed this as completed Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant