-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add AveragingOp #716
base: main
Are you sure you want to change the base?
Add AveragingOp #716
Conversation
📚 Documentation |
Not sure if this is the best abstraction - open for suggestions and docstring changes We could have a reduction op supporting min, max, mean etc - but only mean is linear. We could use the maximum index for the domain size if domain_sze has not been set (still ofc with a warning) - assuming that you want to use all data somewhere. But the cmrf reco already breaks that assumption. |
Co-authored-by: Christoph Kolbitsch <christoph.kolbitsch@ptb.de>
Co-authored-by: Christoph Kolbitsch <christoph.kolbitsch@ptb.de>
rng = RandomGenerator(seed=0) | ||
u = rng.complex64_tensor(size=(5, 15, 10)) | ||
v = rng.complex64_tensor(size=(5, 3, 10)) | ||
idx = [0, 1, 2], slice(0, 6, 2), torch.tensor([-1, -2, -3]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we also add the case for a boolean Tensor? sth like [False, True, False, True, True] which in test_averageingop_forward
should be u[(1,3,4),].mean(dim=0), right?
Calculates the avarage over a dimenion or over subets aong a dimension
Useful for qMRI if the images hve been reconstruced using a sliding windows.
Example cmrf (pseudocode):