code: def test_broadcast_grad():
      # rng = numpy.random.RandomState(utt.fetch_seed())
      x1 = T.tensor4("x")
      # x1_data = rng.randn(1, 1, 300, 300)
      sigma = T.scalar("sigma")
      # sigma_data = 20
      window_radius = 3
  
      filter_1d = T.arange(-window_radius, window_radius + 1)
      filter_1d = filter_1d.astype(theano.config.floatX)
      filter_1d = T.exp(-0.5 * filter_1d**2 / sigma**2)
      filter_1d = filter_1d / filter_1d.sum()
  
      filter_W = filter_1d.dimshuffle(["x", "x", 0, "x"])
  
      y = theano.tensor.nnet.conv2d(
          x1,
          filter_W,
          border_mode="full",
          filter_shape=[1, 1, None, None],
      )
      theano.grad(y.sum(), sigma)
  
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 1 for calling a global function with example usage: test_broadcast_grad() without return types