(x,
         conv_size,
         depth,
         stride,
         weight_decay,
         padding='SAME',
         rate=1,
         params=None)
return x, params
A block that performs convolution.
A block that performs convolution.
A block that performs convolution .
def conv(x,
         conv_size,
         depth,
         stride,
         weight_decay,
         padding='SAME',
         rate=1,
         params=None):
  """A block that performs convolution."""
  params_keys, params_vars = [], []
  scope_name = tf.get_variable_scope().name
  input_depth = x.get_shape().as_list()[-1]
  if params is None:
    w_conv = weight_variable([conv_size[0], conv_size[1], input_depth, depth],
                             weight_decay)
  else:
    w_conv = params[scope_name + '/kernel']

  params_keys += [scope_name + '/kernel']
  params_vars += [w_conv]

  x = conv2d(x, w_conv, stride=stride, padding=padding, rate=rate)
  params = collections.OrderedDict(zip(params_keys, params_vars))

  return x, params
def conv ( x , conv_size , depth , stride , weight_decay , padding = 'SAME' , rate = 1 , params = None ) : params_keys , params_vars = [ ] , [ ] scope_name = tf . get_variable_scope ( ) . name input_depth = x . get_shape ( ) . as_list ( ) [ - 1 ] if params is None : w_conv = weight_variable ( [ conv_size [ 0 ] , conv_size [ 1 ] , input_depth , depth ] , weight_decay ) else : w_conv = params [ scope_name + '/kernel' ] params_keys += [ scope_name + '/kernel' ] params_vars += [ w_conv ] x = conv2d ( x , w_conv , stride = stride , padding = padding , rate = rate ) params = collections . OrderedDict ( zip ( params_keys , params_vars ) ) return x , params