with tf.name_scope(scope or 'PruneSmallBoxes'):
    height, width = height_width(boxlist)
    is_valid = tf.logical_and(
        tf.greater_equal(width, min_side), tf.greater_equal(height, min_side))
    return gather(boxlist, tf.reshape(tf.where(is_valid), [-1]))