import tensorflow as tf

    offset: (height, width)

  Returns:

  """

  with tf.variable_scope('anchor_generator'):
    if offset is None:
      offset = [stride[0]/2, stride[1]/2]

    features_width = tf.cast(features_width, tf.int32)
    features_height = tf.cast(features_height, tf.int32)
    scales = tf.convert_to_tensor(scales, dtype=tf.float32)
    ratios = tf.convert_to_tensor(ratios, dtype=tf.float32)
    offset = tf.convert_to_tensor(offset, dtype=tf.float32)

    scales_grid, ratios_grid = tf.meshgrid(scales,
                                           ratios)

    scales_grid = tf.reshape(scales_grid, [-1, 1])
    ratios_grid = tf.reshape(ratios_grid, [-1, 1])

    ratio_sqrts = tf.sqrt(ratios_grid)

