def __init__(self, axis=1, momentum=0.9, epsilon=1e-05, center=True, scale=True, beta_initializer='zeros', gamma_initializer='ones', running_mean_initializer='zeros', running_variance_initializer='ones', in_channels=0, **kwargs):
    super(BatchNorm, self).__init__(**kwargs)
    self._kwargs = {'axis': axis, 'eps': epsilon, 'momentum': momentum, 'fix_gamma': (not scale)}
    if (in_channels != 0):
        self.in_channels = in_channels
    self.gamma = self.params.get('gamma', grad_req=('write' if scale else 'null'), shape=(in_channels,), init=gamma_initializer, allow_deferred_init=True, differentiable=scale)
    self.beta = self.params.get('beta', grad_req=('write' if center else 'null'), shape=(in_channels,), init=beta_initializer, allow_deferred_init=True, differentiable=center)
    self.running_mean = self.params.get('running_mean', grad_req='null', shape=(in_channels,), init=running_mean_initializer, allow_deferred_init=True, differentiable=False)
    self.running_var = self.params.get('running_var', grad_req='null', shape=(in_channels,), init=running_variance_initializer, allow_deferred_init=True, differentiable=False)
def __init__(self, axis=1, momentum=0.9, epsilon=1e-05, center=True, scale=True, beta_initializer='zeros', gamma_initializer='ones', running_mean_initializer='zeros', running_variance_initializer='ones', in_channels=0, **kwargs):
    super(BatchNorm, self).__init__(**kwargs)
    self._kwargs = {'axis': axis, 'eps': epsilon, 'momentum': momentum, 'fix_gamma': (not scale)}
    if (in_channels != 0):
        self.in_channels = in_channels
    self.gamma = self.params.get('gamma', grad_req=('write' if scale else 'null'), shape=(in_channels,), init=gamma_initializer, allow_deferred_init=True, differentiable=scale)
    self.beta = self.params.get('beta', grad_req=('write' if center else 'null'), shape=(in_channels,), init=beta_initializer, allow_deferred_init=True, differentiable=center)
    self.running_mean = self.params.get('running_mean', grad_req='null', shape=(in_channels,), init=running_mean_initializer, allow_deferred_init=True, differentiable=False)
    self.running_var = self.params.get('running_var', grad_req='null', shape=(in_channels,), init=running_variance_initializer, allow_deferred_init=True, differentiable=False)