def block_sep0(self, Y):
r"""Separate variable into component corresponding to
:math:`\mathbf{y}_0` in :math:`\mathbf{y}\;\;`. The method from
parent class :class:`.ADMMTwoBlockCnstrnt` is overridden here to
allow swapping of K (multi-image) and M (filter) axes in block 0
so that it can be concatenated on axis M with block 1. This is
necessary because block 0 has the dimensions of S while block 1
has the dimensions of D. Handling of multi-channel signals
substantially complicate this issue. There are two multi-channel
cases: multi-channel dictionary and signal (Cd = C > 1), and
single-channel dictionary with multi-channel signal (Cd = 1, C >
1). In the former case, S and D shapes are (N x C x K x 1) and
(N x C x 1 x M) respectively. In the latter case,
:meth:`.__init__` has already taken care of combining C
(multi-channel) and K (multi-image) axes in S, so the S and D
shapes are (N x 1 x C K x 1) and (N x 1 x 1 x M) respectively.
"""
return np.swapaxes(Y[(slice(None),)*self.blkaxis +
(slice(0, self.blkidx),)], self.cri.axisK, self.cri.axisM)
评论列表
文章目录