Fixed gradient unit test
This commit is contained in:
parent
bf469afbd1
commit
01bc41b8c5
@ -37,9 +37,9 @@ class CheckParityTestCase(unittest.TestCase):
|
|||||||
class GradientTestCase(unittest.TestCase):
|
class GradientTestCase(unittest.TestCase):
|
||||||
"""Test case for the calculation of the gradient of the code-constraint-polynomial"""
|
"""Test case for the calculation of the gradient of the code-constraint-polynomial"""
|
||||||
def test_grad_h(self):
|
def test_grad_h(self):
|
||||||
H = np.array([[1, 0, 1],
|
H = np.array([[1, 0, 0],
|
||||||
[0, 1, 0]])
|
[0, 1, 0]])
|
||||||
x = np.array([2, 3, 4])
|
x = np.array([1, 2, 2])
|
||||||
|
|
||||||
decoder = proximal.ProximalDecoder(H)
|
decoder = proximal.ProximalDecoder(H)
|
||||||
grad = decoder._grad_h(x)
|
grad = decoder._grad_h(x)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user