in 04_detect_segment/utils_box.py [0:0]
def gen_grid(grid_n):
cell_x = tf.range(0, grid_n, dtype=tf.float32)
cell_x = tf.tile(tf.expand_dims(cell_x, axis=0), [grid_n, 1])
cell_x = cell_x
cell_y = tf.range(0, grid_n, dtype=tf.float32)
cell_y = tf.tile(tf.expand_dims(cell_y, axis=0), [grid_n, 1])
cell_y = tf.transpose(cell_y)
cell_y = cell_y
grid = tf.stack([cell_x, cell_y], axis=2) # shape [grid_n, grid_n, 2]
return grid