code: def test_invalid_input_shape(self):
      # Tests that when the shape gived at build time is not the same as
      # run time we raise an error
  
      for unroll_batch in [None, 1, 3]:
          for unroll_kern in [None, 2, 4]:
              for unroll_patch in [None, True, False]:
                  for mode in ["valid", "full"]:
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_image_shape=(2, 2, 8, 8),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_image_shape=(3, 1, 8, 8),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_image_shape=(3, 2, 7, 8),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_image_shape=(3, 2, 8, 7),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
  
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_filter_shape=(3, 2, 5, 5),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_filter_shape=(4, 1, 5, 5),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_filter_shape=(4, 2, 6, 5),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
                      self.assertRaises(
                          ValueError,
                          self.validate,
                          (3, 2, 8, 8),
                          (4, 2, 5, 5),
                          mode,
                          N_filter_shape=(4, 2, 5, 6),
                          unroll_batch=unroll_batch,
                          unroll_kern=unroll_kern,
                          unroll_patch=unroll_patch,
                      )
  
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 19 for calling the TestConv2D obj's underlying member method code with example usage: obj.test_invalid_input_shape() without return types