plot_utils¶
In the plot_utils
module we have defined a function,
make_gif
,
to realize animated gifs out of a list of figures.
This is to us
a fine way to visualize the imporvement during training of a
machine learning algorithm, especially if they deal with
reproducing patterns or images.
make_gif¶
-
plot_utils.
make_gif
(input_im, output_gif='my_gif.gif', duration=0.5, keep_im=False)[source]¶ Function to create a gif out of a list of figures.
- Parameters
input_im (list[str]) – file names of images to compose the animated gif.
output_gif (str) – Optional (Default=”my_gif.gif”). Name of the output gif file.
duration (float) – Optional (Default=0.5). Define the time interval (in seconds) between frames.
keep_im (bool) – Optional (Default=False). If True, the images used to create the gif are kept in memory; otherwise they are deleted.
- Raises
OSError – Incorrect file(s) name.