def test_grad(self): x = vector("x") a = np.random.random(50).astype(config.floatX) aesara.function([x], grad(aet_sum(diff(x)), x)) utt.verify_grad(self.op, [a]) for k in range(TestDiffOp.nb): aesara.function([x], grad(aet_sum(diff(x, n=k)), x)) utt.verify_grad(DiffOp(n=k), [a], eps=7e-3)
def setup_method(self): super().setup_method() self.op_class = DiffOp self.op = DiffOp()