コード例 #1
0
 def test_23(self):
     N = 16
     Nd = 5
     M = 4
     D = cp.random.randn(Nd, Nd, M)
     s = cp.random.randn(N, N)
     lmbda = 1e-1
     try:
         b = cbpdn.ConvBPDNMaskDcpl(D, s, lmbda)
         b.solve()
     except Exception as e:
         print(e)
         assert 0
コード例 #2
0
 def test_28(self):
     N = 16
     Nd = 5
     K = 2
     M = 4
     D = cp.random.randn(Nd, Nd, M)
     s = cp.random.randn(N, N, K)
     dt = cp.float32
     opt = cbpdn.ConvBPDNMaskDcpl.Options(
         {'Verbose': False, 'LinSolveCheck': True, 'MaxMainIter': 20,
          'AutoRho': {'Enabled': True}, 'DataType': dt})
     lmbda = 1e-1
     b = cbpdn.ConvBPDNMaskDcpl(D, s, lmbda, opt=opt)
     b.solve()
     assert b.X.dtype == dt
     assert b.Y.dtype == dt
     assert b.U.dtype == dt