code: def test_grad_cast_input(self):
      # Tests the gradient when both inputs are on the GPU.
      x = tensor.vector("x", dtype=self.dtype)
      y = tensor.vector("y", dtype=self.dtype)
      c = tensor.iscalar("c")
      z = ifelse(c, self.cast_output(x), self.cast_output(y))
      gx, gy = tensor.grad(z.sum(), [x, y])
  
      theano.function([c, x, y], [gx, gy], mode=self.mode)
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  from nose.plugins.skip import SkipTest
  from six.moves import reduce
  import theano
  from theano import tensor
  import theano.ifelse
  from theano.ifelse import IfElse, ifelse
  from theano.tests import unittest_tools
label_desc: Use image node_id 7 for calling the test_ifelse obj's underlying member method code with example usage: obj.test_grad_cast_input() without return types