code: def test_batch_normalization_train_without_running_averages():
      # compile and run batch_normalization_train without running averages
      utt.seed_rng()
  
      x, scale, bias, dy = (
          T.tensor4("x"),
          T.tensor4("scale"),
          T.tensor4("bias"),
          T.tensor4("dy"),
      )
      data_shape = (5, 10, 30, 25)
      param_shape = (1, 10, 30, 25)
  
      # forward pass
      out, x_mean, x_invstd = bn.batch_normalization_train(
          x, scale, bias, "per-activation"
      )
      # backward pass
      grads = T.grad(None, wrt=[x, scale, bias], known_grads={out: dy})
      # compile
      f = theano.function(
          [x, scale, bias, dy], [out, x_mean, x_invstd] + grads
      )
      # check if the abstract Ops have been replaced
      assert not any(
          [
              isinstance(
                  n.op,
                  (
                      bn.AbstractBatchNormTrain,
                      bn.AbstractBatchNormInference,
                      bn.AbstractBatchNormTrainGrad,
                  ),
              )
              for n in f.maker.fgraph.toposort()
          ]
      )
      # run
      X = 4 + 3 * np.random.randn(*data_shape).astype(
          theano.config.floatX
      )
      Dy = -1 + 2 * np.random.randn(*data_shape).astype(
          theano.config.floatX
      )
      Scale = np.random.randn(*param_shape).astype(theano.config.floatX)
      Bias = np.random.randn(*param_shape).astype(theano.config.floatX)
      f(X, Scale, Bias, Dy)
  
file_path: Theano/theano/tensor/nnet/tests/test_bn.py
imports: from __future__ import absolute_import, print_function, division
  import theano
  import theano.tensor
  from theano.tests import unittest_tools
  import numpy
  from collections import OrderedDict
  from theano.tensor.nnet import bn
label_desc: Use image node_id 6 for calling a global function with example usage: test_batch_normalization_train_without_running_averages() without return types