def check_nondiff_rop(self, y):
        raised = False
        try:
            tmp = tensor.Rop(y, self.x, self.v)
        except ValueError:
            raised = True
        if not raised:
            self.fail((
                'Op did not raise an error even though the function'
                ' is not differentiable'))
If your op is not differentiable(so you can't define Rop)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/tests/test_rop.py/RopLop_checker.check_nondiff_rop