Skip to content

Commit

Permalink
Merge pull request #101 from openspyrit/hspim
Browse files Browse the repository at this point in the history
update sigma for inputs of shape (B, 2M) -> (*, 2M)
  • Loading branch information
tbaudier committed Jun 6, 2023
2 parents 2d27fbf + 59118e4 commit 15b5fe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ https://spyrit.readthedocs.io/
* Thomas Baudier
* Sebastien Crombez
* Nicolas Ducros - [Website](https://www.creatis.insa-lyon.fr/~ducros/WebPage/index.html)
* Antonio Tomas Lorente Mur - [Website](https://www.creatis.insa-lyon.fr/~lorente/)
* Antonio Tomas Lorente Mur - [Website]( https://sites.google.com/view/antonio-lorente-mur/)
* Fadoua Taia-Alaoui

# How to cite?
Expand Down
6 changes: 3 additions & 3 deletions spyrit/core/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def sigma(self, x: torch.tensor) -> torch.tensor:
:attr:`x`: batch of images in the Hadamard domain
Shape:
- Input: :math:`(B,2*M)` where :math:`B` is the batch dimension
- Output: :math:`(B, M)`
- Input: :math:`(*,2*M)` :math:`*` indicates one or more dimensions
- Output: :math:`(*, M)`
Example:
>>> x = torch.rand([10,2*400], dtype=torch.float)
Expand All @@ -312,7 +312,7 @@ def sigma(self, x: torch.tensor) -> torch.tensor:
torch.Size([10, 400])
"""
x = x[:,self.even_index] + x[:,self.odd_index]
x = x[...,self.even_index] + x[...,self.odd_index]
x = 4*x/(self.alpha**2) # Cov is in [-1,1] so *4
return x

Expand Down

0 comments on commit 15b5fe8

Please sign in to comment.