def test_09(self): lmbda = 3 opt = tvl1.TVL1Deconv.Options({'MaxMainIter': 20}) b = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda, opt) b.solve() opt['Y0'] = b.Y try: c = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda, opt) c.solve() except Exception as e: print(e) assert 0
def test_02(self): lmbda = 3 try: b = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda) b.solve() except Exception as e: print(e) assert 0
def test_02(self): lmbda = 3 opt = tvl1.TVL1Deconv.Options({ 'Verbose': False, 'gEvalY': False, 'MaxMainIter': 250, 'rho': 10.0 }) b = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda, opt, axes=(0, 1, 2)) X = b.solve() assert cp.abs(b.itstat[-1].ObjFun - 12363.969118576981) < 1e-5 assert sm.mse(self.U, X) < 1e-4
def test_02(self): lmbda = 3 opt = tvl1.TVL1Deconv.Options({ 'Verbose': False, 'gEvalY': False, 'MaxMainIter': 250, 'rho': 10.0 }) b = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda, opt) X = b.solve() assert cp.abs(b.itstat[-1].ObjFun - 831.88219947939172) < 1e-5 assert sm.mse(self.U, X) < 1e-4
def test_06(self): lmbda = 3 dt = cp.float32 opt = tvl1.TVL1Deconv.Options({ 'Verbose': False, 'MaxMainIter': 20, 'AutoRho': { 'Enabled': True }, 'DataType': dt }) b = tvl1.TVL1Deconv(cp.ones((1, )), self.D, lmbda, opt=opt) b.solve() assert b.X.dtype == dt assert b.Y.dtype == dt assert b.U.dtype == dt