def test_29(self): N = 16 Nd = 5 M = 4 D = cp.random.randn(Nd, Nd, M) s = cp.random.randn(N, N) w = cp.ones(s.shape) lmbda = 1e-1 try: b = cbpdn.AddMaskSim(cbpdn.ConvBPDN, D, s, w, lmbda) b.solve() b.reconstruct() except Exception as e: print(e) assert 0
def test_30(self): N = 16 Nd = 5 M = 4 D = cp.random.randn(Nd, Nd, M) s = cp.random.randn(N, N) w = cp.ones(s.shape) dt = cp.float32 opt = cbpdn.ConvBPDN.Options( {'Verbose': False, 'MaxMainIter': 20, 'AutoRho': {'Enabled': True}, 'DataType': dt}) lmbda = 1e-1 b = cbpdn.AddMaskSim(cbpdn.ConvBPDN, D, s, w, lmbda, opt=opt) b.solve() assert b.cbpdn.X.dtype == dt assert b.cbpdn.Y.dtype == dt assert b.cbpdn.U.dtype == dt