(name, shape)
return var
weight_variable generates a weight variable of a given shape.
weight_variable generates a weight variable of a given shape.
weight_variable generates a weight variable of a given shape .
def _weight_variable(name, shape):
  """weight_variable generates a weight variable of a given shape."""
  with tf.device('/cpu:0'):
    initializer = tf.truncated_normal_initializer(stddev=0.1)
    var = tf.get_variable(name,shape,initializer=initializer, dtype=tf.float32)
  return var
def _weight_variable ( name , shape ) : with tf . device ( '/cpu:0' ) : initializer = tf . truncated_normal_initializer ( stddev = 0.1 ) var = tf . get_variable ( name , shape , initializer = initializer , dtype = tf . float32 ) return var