mirtorch.linear.basics.Diag
- class mirtorch.linear.basics.Diag(P: torch.Tensor)
Expand an input vector into a diagonal matrix. For example, x is an 5*5 image. So P should be also a 5*5 weight vector. P*x (pytorch multiplication here) = Diag{vec(P)}*vec(x)
- P
the diagonal matrix
- __init__(P: torch.Tensor)
Initiate the linear operator.
Methods
__init__
(P)Initiate the linear operator.
adjoint
(x)Apply the adjoint operator
apply
(x)Apply the forward operator
to
(*args, **kwargs)Copy to different devices
Attributes
H
Apply the (Hermitian) transpose