mrpro.operators.MultiIdentityOp
- class mrpro.operators.MultiIdentityOp[source]
Bases:
EndomorphOperator
The Identity Operator.
An endomorph Operator that returns multiple inputs unchanged.
- __call__(*x: Tensor) tuple[Tensor, ...] [source]
Apply the multi-input identity operation.
This operator returns all input tensors unchanged.
- Parameters:
*x (
Tensor
) – One or more input tensors.- Returns:
The input tensors, unchanged.
- adjoint(*x: Tensor) tuple[Tensor, ...] [source]
Apply the adjoint of the multi-input identity operation.
Since the multi-input identity operator is self-adjoint, this method returns all input tensors unchanged.
- Parameters:
*x (
Tensor
) – One or more input tensors.- Returns:
The input tensors, unchanged.
- forward(*x: Tensor) tuple[Tensor, ...] [source]
Apply forward of MultiIdentityOp.
Note
Prefer calling the instance of the MultiIdentityOp operator as
operator(x)
over directly calling this method. See this PyTorch discussion.
- __add__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout] [source]
- __add__(other: Tensor | complex) Operator[Unpack[Tin], tuple[Unpack[Tin]]]
Operator addition.
Returns
lambda x: self(x) + other(x)
if other is a operator,lambda x: self(x) + other*x
if other is a tensor
- __matmul__(other: EndomorphOperator) EndomorphOperator [source]
- __matmul__(other: Operator[Unpack[Tin], Tout]) Operator[Unpack[Tin], Tout]
Operator composition.
- __mul__(other: Tensor | complex) Operator[Unpack[Tin], Tout] [source]
Operator multiplication with tensor.
Returns
lambda x: self(x*other)
- __radd__(other: Tensor | complex) Operator[Unpack[Tin], tuple[Unpack[Tin]]] [source]
Operator right addition.
Returns
lambda x: other*x + self(x)