def create_gif(image_path):
    frames = []
    gif_name = os.path.join('images', 'mnist1.gif')
    image_list = os.listdir(image_path)
    sorted(image_list)
    for image_name in image_list:
        frames.append(imageio.imread(os.path.join(image_path, image_name)))
    imageio.mimsave(gif_name, frames, 'GIF', duration=0.1)
def create_gif(image_path):
    frames = []
    gif_name = os.path.join('images', 'mnist1.gif')
    image_list = os.listdir(image_path)
    sorted(image_list)
    for image_name in image_list:
        frames.append(imageio.imread(os.path.join(image_path, image_name)))
    imageio.mimsave(gif_name, frames, 'GIF', duration=0.1)