:py:mod:`visualize` =================== .. py:module:: visualize .. autoapi-nested-parse:: Routines for visualizing different aspects of training or its final outputs. Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: visualize.plot_images_two_rows visualize.plot_reconstruction_on_first_batch .. py:function:: plot_images_two_rows(top: Iterable[numpy.ndarray], bottom: Iterable[numpy.ndarray], row_size: int = 10, figure_size=(20, 4)) -> None Plot a top-row of images, alongside a bottom-row of images. :param top: the images on the top-row. There must be at least :code:row_size: elements. :param bottom: the images on the bottom-row. There must be at least :code:row_size: elements. :param row_size: the maximum number of images on a row. :param figure_size: the size of figure in inches, as passed to :func:`plt.figure`. .. py:function:: plot_reconstruction_on_first_batch(loader: torch.utils.data.DataLoader, model_reconstructing: torch.nn.Module) -> None Plots the first batch of reconstructed images against the original images. :param loader: a loader from which the first batch of images is loaded. :param model_reconstructing: a model which reconstructs an image (produces an image of identical structure to the input image, when passed an input-image).