code: def test_infer_shape(self):
      # Note: infer_shape is incomplete and thus input and filter shapes
      # must be provided explicitly
  
      def rand(*shape):
          r = np.asarray(np.random.rand(*shape), dtype="float64")
          return r * 2 - 1
  
      adtens = T.dtensor4()
      bdtens = T.dtensor4()
      aivec_val = [4, 5, 6, 3]
      bivec_val = [7, 5, 3, 2]
      adtens_val = rand(*aivec_val)
      bdtens_val = rand(*bivec_val)
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="valid",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="full",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      aivec_val = [6, 2, 8, 3]
      bivec_val = [4, 2, 5, 3]
      adtens_val = rand(*aivec_val)
      bdtens_val = rand(*bivec_val)
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="valid",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="full",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      aivec_val = [3, 6, 7, 5]
      bivec_val = [5, 6, 3, 2]
      adtens_val = rand(*aivec_val)
      bdtens_val = rand(*bivec_val)
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="valid",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="full",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      aivec_val = [3, 6, 7, 5]
      bivec_val = [5, 6, 2, 3]
      adtens_val = rand(*aivec_val)
      bdtens_val = rand(*bivec_val)
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="valid",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="full",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      aivec_val = [5, 2, 4, 3]
      bivec_val = [6, 2, 4, 3]
      adtens_val = rand(*aivec_val)
      bdtens_val = rand(*bivec_val)
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="valid",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
      self._compile_and_check(
          [adtens, bdtens],
          [
              self.conv2d(
                  adtens,
                  bdtens,
                  aivec_val,
                  bivec_val,
                  border_mode="full",
              )
          ],
          [adtens_val, bdtens_val],
          conv.ConvOp,
          excluding=["conv_gemm"],
      )
  
imports: from __future__ import absolute_import, print_function, division
  import time
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  from theano.tensor.nnet import conv
  from theano.tensor.basic import _allclose, NotScalarConstantError
  from theano.tests.unittest_tools import attr
label_desc: Use image node_id 26 for calling the TestConv2D obj's underlying member method code with example usage: obj.test_infer_shape() and returns: unknown