Пример #1
0
 def test_16(self):
     Nr = 16
     Nc = 17
     Nd = 5
     M = 4
     D = cp.random.randn(Nd, Nd, M)
     s = cp.random.randn(Nr, Nc)
     lmbda = 1e-1
     mu = 1e-2
     try:
         b = cbpdn.ConvElasticNet(D, s, lmbda, mu)
         b.solve()
     except Exception as e:
         print(e)
         assert 0
Пример #2
0
 def test_17(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.ConvElasticNet.Options(
         {'Verbose': False, 'LinSolveCheck': True, 'MaxMainIter': 20,
          'AutoRho': {'Enabled': True}, 'DataType': dt})
     lmbda = 1e-1
     mu = 1e-2
     b = cbpdn.ConvElasticNet(D, s, lmbda, mu, opt=opt)
     b.solve()
     assert b.X.dtype == dt
     assert b.Y.dtype == dt
     assert b.U.dtype == dt