code: def test_dtype_upcast(self):
      # Checks dtype upcast for CorrMM methods.
  
      def rand(shape, dtype="float64"):
          r = np.asarray(np.random.rand(*shape), dtype=dtype)
          return r * 2 - 1
  
      if not theano.config.cxx:
          raise SkipTest("Need cxx to test conv2d")
  
      ops = [
          corr.CorrMM,
          corr.CorrMM_gradWeights,
          corr.CorrMM_gradInputs,
      ]
      a_shapes = [[4, 5, 6, 3], [1, 5, 6, 3], [1, 5, 6, 3]]
      b_shapes = [[7, 5, 3, 2], [1, 5, 3, 1], [7, 1, 3, 1]]
      dtypes = ["float32", "float64"]
  
      for op, a_shape, b_shape in zip(ops, a_shapes, b_shapes):
          for a_dtype in dtypes:
              for b_dtype in dtypes:
                  c_dtype = theano.scalar.upcast(a_dtype, b_dtype)
                  a_tens = T.tensor4(dtype=a_dtype)
                  b_tens = T.tensor4(dtype=b_dtype)
                  a_tens_val = rand(a_shape, dtype=a_dtype)
                  b_tens_val = rand(b_shape, dtype=b_dtype)
  
                  c_tens = op()(a_tens, b_tens)
                  f = theano.function(
                      [a_tens, b_tens], c_tens, mode=self.mode
                  )
                  assert_equals(
                      f(a_tens_val, b_tens_val).dtype, c_dtype
                  )
  
imports: from __future__ import absolute_import, print_function, division
  from nose.plugins.skip import SkipTest
  from nose.plugins.attrib import attr
  from nose.tools import assert_equals
  import numpy
  from six import integer_types
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  from theano.tensor.nnet import corr, conv
  from theano.tensor.nnet.tests.test_abstract_conv import Grouped_conv_noOptim, TestUnsharedConv
  from theano.tensor.nnet.tests.test_abstract_conv import TestAsymmetricPadding, TestCausalConv
label_desc: Use image node_id 11 for calling the TestCorr2D obj's underlying member method code with example usage: obj.test_dtype_upcast() and returns: unknown