multik
multik copied to clipboard
Add Tile function
Hi, I'm going to implement the postprocessing for the YOLOv4 model in the KotlinDL library, but it requires many different analogs of the NumPy functions.
Could you please add the analogue of the np.tile
function?
This function is quite extensive. In essence, this is broadcasting with the creation of an array. The difficulty is adding such a function to the api, can you give specific cases of using this function in the yolo model?
This is a script which should be ported, looks like it involves broadcasting, due to expand_dims usage
xy_grid = np.meshgrid(np.arange(output_size), np.arange(output_size))
xy_grid = np.expand_dims(np.stack(xy_grid, axis=-1), axis=2)
xy_grid = np.tile(np.expand_dims(xy_grid, axis=0), [1, 1, 1, 3, 1])
xy_grid = xy_grid.astype(np.float)