Esempio n. 1
0
 def test_29(self):
     N = 16
     M = 4
     Nc = 3
     Nd = 8
     X = np.random.randn(N, N, Nc, 1, M)
     S = np.random.randn(N, N, Nc)
     W = np.random.randn(N, N)
     L = 5e1
     try:
         opt = ccmod.ConvCnstrMODMask.Options({
             'Verbose': False,
             'MaxMainIter': 200,
             'L': L,
             'Backtrack': BacktrackRobust()
         })
         c = ccmod.ConvCnstrMODMask(X,
                                    S,
                                    W, (Nd, Nd, 1, M),
                                    opt=opt,
                                    dimK=0)
         c.solve()
     except Exception as e:
         print(e)
         assert 0
     assert np.array(c.getitstat().Rsdl)[-1] < 5e-3
Esempio n. 2
0
 def test_22(self):
     N = 16
     K = 3
     M = 4
     Nd = 8
     X = np.random.randn(N, N, 1, K, M)
     S = np.random.randn(N, N, K)
     W = np.random.randn(N, N, K)
     try:
         opt = ccmod.ConvCnstrMODMask.Options({
             'Verbose': False,
             'MaxMainIter': 20
         })
         c = ccmod.ConvCnstrMODMask(X, S, W, (Nd, Nd, 1, M), opt=opt)
         c.solve()
     except Exception as e:
         print(e)
         assert 0
Esempio n. 3
0
 def test_19(self):
     N = 16
     M = 4
     Nd = 8
     X = np.random.randn(N, N, 1, 1, M)
     S = np.random.randn(N, N)
     W = np.array([1.0])
     try:
         opt = ccmod.ConvCnstrMODMask.Options({
             'Verbose': False,
             'MaxMainIter': 20
         })
         c = ccmod.ConvCnstrMODMask(X,
                                    S,
                                    W, (Nd, Nd, 1, M),
                                    opt=opt,
                                    dimK=0)
         c.solve()
     except Exception as e:
         print(e)
         assert 0