(
    x,
    film_selector=None,
    num_film_sets=0,
    batch_norm_fn=bn,
    params=None,
    moments=None,
    is_training=True,
    backprop_through_moments=True)
Returns the result of batch normalization.
Returns the result of batch normalization.
Returns the result of batch normalization .
def _bn_wrapper(
    x,
    film_selector=None,
    num_film_sets=0,
    batch_norm_fn=bn,
    params=None,
    moments=None,
    is_training=True,
    backprop_through_moments=True):
  """Returns the result of batch normalization."""
  if batch_norm_fn not in [bn, bn_flute_train, bn_flute_eval]:
    raise ValueError(
        'Unexpected `batch_norm_fn` {}. Expected one of bn, bn_flute_train'
        'or bn_flute_eval.'.format(batch_norm_fn))
  if batch_norm_fn in [bn_flute_train, bn_flute_eval]:
    if not num_film_sets:
      raise ValueError('Expected num_film_sets > 0.')
    return batch_norm_fn(
        x,
        film_selector=film_selector,
        num_sets=num_film_sets,
        params=params,
        moments=moments,
        is_training=is_training,
        backprop_through_moments=backprop_through_moments)
  else:
    return batch_norm_fn(
        x,
        params=params,
        moments=moments,
        is_training=is_training,
        backprop_through_moments=backprop_through_moments)
def _bn_wrapper ( x , film_selector = None , num_film_sets = 0 , batch_norm_fn = bn , params = None , moments = None , is_training = True , backprop_through_moments = True ) : if batch_norm_fn not in [ bn , bn_flute_train , bn_flute_eval ] : raise ValueError ( 'Unexpected `batch_norm_fn` {}. Expected one of bn, bn_flute_train' 'or bn_flute_eval.' . format ( batch_norm_fn ) ) if batch_norm_fn in [ bn_flute_train , bn_flute_eval ] : if not num_film_sets : raise ValueError ( 'Expected num_film_sets > 0.' ) return batch_norm_fn ( x , film_selector = film_selector , num_sets = num_film_sets , params = params , moments = moments , is_training = is_training , backprop_through_moments = backprop_through_moments ) else : return batch_norm_fn ( x , params = params , moments = moments , is_training = is_training , backprop_through_moments = backprop_through_moments )