def test_fill_grad(self): # Fix bug reported at # https://groups.google.com/d/topic/theano-users/nQshB8gUA6k/discussion x = TensorType(config.floatX, (False, True, False))("x") y = TensorType(config.floatX, (False, True, False))("y") e = second(x, y) aesara.grad(e.sum(), y)
def test_second(): a0 = scalar("a0") b = scalar("b") out = aes.second(a0, b) fgraph = FunctionGraph([a0, b], [out]) compare_jax_and_py(fgraph, [10.0, 5.0]) a1 = vector("a1") out = aet.second(a1, b) fgraph = FunctionGraph([a1, b], [out]) compare_jax_and_py(fgraph, [np.zeros([5], dtype=config.floatX), 5.0])