def image_summary(tag, image):
    """Outputs a `Summary` protocol buffer with image(s).

    Parameters
    ----------
        tag : str
            A name for the generated summary. Will also serve as a series name in TensorBoard.
        image : MXNet `NDArray` or `numpy.ndarray`
            Image data that is one of the following layout: (H, W), (C, H, W), (N, C, H, W).
            The pixel values of the image are assumed to be normalized in the range [0, 1].
            The image will be rescaled to the range [0, 255] and cast to `np.uint8` before creating
            the image protobuf.

    Returns
    -------
        A `Summary` protobuf of the image.
    """
    tag = _clean_tag(tag)
    image = _prepare_image(image)
    image = _make_image(image)
    return Summary(value=[Summary.Value(tag=tag, image=image)])
Outputs a `Summary` protocol buffer with image(s).

    Parameters
    ----------
        tag : str
            A name for the generated summary. Will also serve as a series name in TensorBoard.
        image : MXNet `NDArray` or `numpy.ndarray`
            Image data that is one of the following layout: (H, W), (C, H, W), (N, C, H, W).
            The pixel values of the image are assumed to be normalized in the range [0, 1].
            The image will be rescaled to the range [0, 255] and cast to `np.uint8` before creating
            the image protobuf.

    Returns
    -------
        A `Summary` protobuf of the image.