mrpro.utils.unsqueeze_right
- mrpro.utils.unsqueeze_right(x: Tensor, n: int) Tensor [source]
Unsqueeze multiple times in the rightmost dimension.
Example
tensor with shape (1,2,3) and n=2 would result in tensor with shape (1,2,3,1,1)
- Parameters:
x – tensor to unsqueeze
n – number of times to unsqueeze
- Return type:
unsqueezed tensor (view)