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 C (channel) 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
(N x C x K x 1) while block 1 has the dimensions of X (N x 1 x
K x M).
"""
if self.y0swapaxes:
return np.swapaxes(Y[(slice(None),)*self.blkaxis +
(slice(0, self.blkidx),)],
self.cri.axisC, self.cri.axisM)
else:
return super(ConvTwoBlockCnstrnt, self).block_sep0(Y)
评论列表
文章目录