class_docstr: MKL Backend
class_docstr_tok: ["MKL","Backend"]
code: def compound_fprop_bn(
      self,
      x,
      xsum,
      xvar,
      gmean,
      gvar,
      gamma,
      beta,
      y,
      eps,
      rho,
      compute_batch_sum,
      accumbeta=0.0,
      relu=False,
      binary=False,
      inference=False,
      outputs=None,
      layer=None,
  ):
      if (
          layer is None
          or outputs is None
          or not isinstance(layer.in_shape, tuple)
      ):
          super(NervanaMKL, self).compound_fprop_bn(
              x,
              xsum,
              xvar,
              gmean,
              gvar,
              gamma,
              beta,
              y,
              eps,
              rho,
              compute_batch_sum,
              accumbeta,
              relu,
              binary,
              inference,
              outputs,
              layer,
          )
          return
  
      primitives = c_longlong(layer.dnnPrimitives.ctypes.data)
      if len(layer.in_shape) == 3:
          C = layer.in_shape[0]
          H = layer.in_shape[1]
          W = layer.in_shape[2]
          D = 1
      elif len(layer.in_shape) == 2:
          C = layer.in_shape[0]
          H = layer.in_shape[1]
          W = layer.in_shape[1]
          D = 1
      elif len(layer.in_shape) == 4:
          C = layer.in_shape[0]
          H = layer.in_shape[1]
          W = layer.in_shape[2]
          D = layer.in_shape[3]
  
      N = (
          int(x.shape[-1]) // H // W // D
      )  # this is/corresponds to the batch size
      gmean = c_longlong(gmean._tensor.ctypes.data)
      gvar = c_longlong(gvar._tensor.ctypes.data)
      self.mklEngine.BatchNormFprop(
          x.get_prim(),
          outputs.get_prim(),
          gamma.get_prim(),
          beta.get_prim(),
          gmean,
          gvar,
          c_float(rho),
          N,
          C,
          H,
          W * D,
          c_double(eps),
          primitives,
          layer.init_f,
          c_int(inference),
      )
      layer.init_f = 1
      layer.shape5D = outputs.shape5D = C, D, H, W, N
  
imports: from __future__ import division
  from builtins import zip
  import logging
  from neon.backends import layer_mkl
  from neon.backends.util.check_mkl import get_mkl_lib
  from neon.backends.nervanacpu import CPUTensor, NervanaCPU, CustomNumpy
  import ctypes
  from cffi import FFI
  from ctypes import c_longlong, c_float, c_double, c_int
  import numpy
  from neon.backends import math_cpu
  from neon.backends.backend import OpTreeNode
  import os
  import sys
label_desc: Use image node_id 21 for calling the NervanaMKL obj's underlying member method code with example usage: obj.compound_fprop_bn(x, xsum, xvar, gmean, gvar, gamma, beta, y, eps, rho, compute_batch_sum, accumbeta, relu, binary, inference, outputs, layer) without return types