class_docstr: Abstract Op for Batch Normalization.
  
  Parameters
  ----------
  axes : a tuple of ints
      The axes along which the input is normalized.
  epsilon
      Epsilon value used in the batch normalization formula. Minimum allowed
      value is 1e-5 (imposed by cuDNN).
class_docstr_tok: ["Abstract","Op","for","Batch","Normalization",".","Parameters","--","--","--","--","--","axes",":","a","tuple","of","ints","The","axes","along","which","the","input","is","normalized",".","epsilon","Epsilon","value","used","in","the","batch","normalization","formula",".","Minimum","allowed","value","is","1e-5","(","imposed","by","cuDNN",")","."]
code: def grad(self, inputs, grads):
      x, scale, bias, est_mean, est_var, epsilon = inputs
      dy = grads[0]
      axes = self.axes
      if min(axes) < 0 or max(axes) >= x.ndim:
          raise ValueError(
              "axes should be less than ndim (<%d), but %s given"
              % (x.ndim, str(axes))
          )
  
      scale, bias, est_mean, est_var = (
          theano.tensor.addbroadcast(t, *axes)
          for t in (scale, bias, est_mean, est_var)
      )
  
      # define helper expressions
      est_var_eps = est_var + epsilon
      est_std = theano.tensor.sqrt(est_var_eps)
      two = theano.tensor.constant(2.0)
  
      # define and return gradients
      dx = dy * (scale / est_std)
      dscale = (dy * (x - est_mean)).sum(axes, keepdims=True) / est_std
      dbias = dy.sum(axes, keepdims=True)
      dmean = -dy.sum(axes, keepdims=True) * (scale / est_std)
      dvar = -(dy * (x - est_mean)).sum(axes, keepdims=True) * (
          scale / (two * est_var_eps * est_std)
      )
      return [
          dx,
          dscale,
          dbias,
          dmean,
          dvar,
          theano.gradient.DisconnectedType()(),
      ]
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano import Apply, Op
  from theano.gof import local_optimizer
  from theano.gof.opt import copy_stack_trace
  from theano.tensor import as_tensor_variable, TensorType
  from theano.tensor import basic
  from theano.tensor.opt import register_specialize_device
  from theano.scalar import Composite, as_common_dtype
  from theano.scalar import add, sub, true_div, mul
label_desc: Use image node_id 4 for calling the AbstractBatchNormInference obj's underlying member method code with example usage: obj.grad(inputs, grads) and returns: list