def conv_linear(args, kw, kh, nin, nout, do_bias, bias_start, prefix):
 assert (args is not None)
 if (not isinstance(args, (list, tuple))):
  args = [args]
 with tf.variable_scope(prefix):
  k = tf.get_variable('CvK', [kw, kh, nin, nout])
  if (len(args) == 1):
   res = tf.nn.conv2d(args[0], k, [1, 1, 1, 1], 'SAME')
  else:
   res = tf.nn.conv2d(tf.concat(3, args), k, [1, 1, 1, 1], 'SAME')
  if (not do_bias):
   return res
  bias_term = tf.get_variable('CvB', [nout], initializer=tf.constant_initializer(0.0))
  return ((res + bias_term) + bias_start)

def conv_linear ( args , kw , kh , nin , nout , do_bias , bias_start , prefix ) : assert ( args is not None ) if ( not isinstance ( args , ( list , tuple ) ) ) : args = [ args ] with tf . variable_scope ( prefix ) : k = tf . get_variable ( 'CvK' , [ kw , kh , nin , nout ] ) if ( len ( args ) == 1 ) : res = tf . nn . conv2d ( args [ 0 ] , k , [ 1 , 1 , 1 , 1 ] , 'SAME' ) else : res = tf . nn . conv2d ( tf . concat ( 3 , args ) , k , [ 1 , 1 , 1 , 1 ] , 'SAME' ) if ( not do_bias ) : return res bias_term = tf . get_variable ( 'CvB' , [ nout ] , initializer = tf . constant_initializer ( 0.0 ) ) return ( ( res + bias_term ) + bias_start )
convolutional linear map .