def save_batch(images, epoch, path, suffix=''):
    samples_path = os.path.join(path, 'samples')
    if (not os.path.exists(samples_path)):
        os.makedirs(samples_path)
    num_images = images.shape[0]
    num_rows = images.shape[1]
    num_cols = images.shape[2]
    canvas = np.zeros((num_rows, (num_images * num_cols), 1), dtype=images.dtype)
    for i in range(num_images):
        canvas[0:num_rows, (i * num_cols):((i + 1) * num_cols)] = images[i]
    img = canvas
    img *= 255
    img = Image.fromarray(np.squeeze(img))
    img = img.convert('L')
    img.save((samples_path + f'/{epoch}_{suffix}.png'))
def save_batch(images, epoch, path, suffix=):
    samples_path = os.path.join(path, 'samples')
    if (not os.path.exists(samples_path)):
        os.makedirs(samples_path)
    num_images = images.shape[0]
    num_rows = images.shape[1]
    num_cols = images.shape[2]
    canvas = np.zeros((num_rows, (num_images * num_cols), 1), dtype=images.dtype)
    for i in range(num_images):
        canvas[0:num_rows, (i * num_cols):((i + 1) * num_cols)] = images[i]
    img = canvas
    img *= 255
    img = Image.fromarray(np.squeeze(img))
    img = img.convert('L')
    img.save((samples_path + f'/{epoch}_{suffix}.png'))