(
    x,
    conv_size,
    depth,
    stride,
    weight_decay,
    padding='SAME',
    params=None,
    moments=None,
    is_training=True,
    rate=1,
    backprop_through_moments=True,
    film_selector=None
)
return x, params, moments
A block that performs convolution, followed by batch-norm.
A block that performs convolution, followed by batch-norm.
A block that performs convolution followed by batch - norm .
def conv_bn(
    x,
    conv_size,
    depth,
    stride,
    weight_decay,
    padding='SAME',
    params=None,
    moments=None,
    is_training=True,
    rate=1,
    backprop_through_moments=True,
    film_selector=None
):
  """A block that performs convolution, followed by batch-norm."""
  params_keys, params_vars = [], []
  moments_keys, moments_vars = [], []
  x, conv_params = conv(
      x,
      conv_size,
      depth,
      stride,
      weight_decay,
      padding=padding,
      params=params,
      rate=rate)
  params_keys.extend(conv_params.keys())
  params_vars.extend(conv_params.values())

  x, bn_params, bn_moments = _bn_wrapper(
      x,
      params=params,
      moments=moments,
      is_training=is_training,
      backprop_through_moments=backprop_through_moments,
      film_selector=film_selector
  )
  params_keys.extend(bn_params.keys())
  params_vars.extend(bn_params.values())
  moments_keys.extend(bn_moments.keys())
  moments_vars.extend(bn_moments.values())

  params = collections.OrderedDict(zip(params_keys, params_vars))
  moments = collections.OrderedDict(zip(moments_keys, moments_vars))

  return x, params, moments
def conv_bn ( x , conv_size , depth , stride , weight_decay , padding = 'SAME' , params = None , moments = None , is_training = True , rate = 1 , backprop_through_moments = True , film_selector = None ) : params_keys , params_vars = [ ] , [ ] moments_keys , moments_vars = [ ] , [ ] x , conv_params = conv ( x , conv_size , depth , stride , weight_decay , padding = padding , params = params , rate = rate ) params_keys . extend ( conv_params . keys ( ) ) params_vars . extend ( conv_params . values ( ) ) x , bn_params , bn_moments = _bn_wrapper ( x , params = params , moments = moments , is_training = is_training , backprop_through_moments = backprop_through_moments , film_selector = film_selector ) params_keys . extend ( bn_params . keys ( ) ) params_vars . extend ( bn_params . values ( ) ) moments_keys . extend ( bn_moments . keys ( ) ) moments_vars . extend ( bn_moments . values ( ) ) params = collections . OrderedDict ( zip ( params_keys , params_vars ) ) moments = collections . OrderedDict ( zip ( moments_keys , moments_vars ) ) return x , params , moments