(dim_grid, number_grid)
return batch_image_grid
Returns a patched `make_grid` function for grid.
Returns a patched `make_grid` function for grid.
Returns a patched make_grid function for grid .
def make_batch_image_grid(dim_grid, number_grid):
  """Returns a patched `make_grid` function for grid."""
  assert dim_grid in (1, 2)
  if dim_grid == 1:
    batch_image_grid = functools.partial(
        batch_image,
        max_images=number_grid,
        rows=1,
        cols=number_grid,
    )
  else:
    batch_image_grid = functools.partial(
        batch_image,
        max_images=number_grid * number_grid,
        rows=number_grid,
        cols=number_grid,
    )
  return batch_image_grid
def make_batch_image_grid ( dim_grid , number_grid ) : assert dim_grid in ( 1 , 2 ) if dim_grid == 1 : batch_image_grid = functools . partial ( batch_image , max_images = number_grid , rows = 1 , cols = number_grid , ) else : batch_image_grid = functools . partial ( batch_image , max_images = number_grid * number_grid , rows = number_grid , cols = number_grid , ) return batch_image_grid