code: def test_graph(self):
      # define common values  first
      groups = 3
      bottom = np.random.rand(3, 6, 5, 5).astype(theano.config.floatX)
      kern = np.random.rand(9, 2, 3, 3).astype(theano.config.floatX)
      bottom_sym = T.tensor4("bottom")
      kern_sym = T.tensor4("kern")
  
      # grouped convolution graph
      conv_group = self.conv(num_groups=groups)(bottom_sym, kern_sym)
      gconv_func = theano.function(
          [bottom_sym, kern_sym], conv_group, mode=self.mode
      )
  
      # Graph for the normal hard way
      kern_offset = kern_sym.shape[0] // groups
      bottom_offset = bottom_sym.shape[1] // groups
      split_conv_output = [
          self.conv()(
              bottom_sym[
                  :, i * bottom_offset : (i + 1) * bottom_offset, :, :
              ],
              kern_sym[
                  i * kern_offset : (i + 1) * kern_offset, :, :, :
              ],
          )
          for i in range(groups)
      ]
      concatenated_output = T.concatenate(split_conv_output, axis=1)
      conv_func = theano.function(
          [bottom_sym, kern_sym], concatenated_output, mode=self.mode
      )
  
      # calculate outputs for each graph
      gconv_output = gconv_func(bottom, kern)
      conv_output = conv_func(bottom, kern)
  
      # compare values
      utt.assert_allclose(gconv_output, conv_output)
  
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 1 for calling the TestGroupCorr2d obj's underlying member method code with example usage: obj.test_graph() without return types