to_monochrome_img

hybrid_learning.datasets.data_visualization.to_monochrome_img(img_t)[source]

torch.Tensor to monochrome PIL.Image.Image in 'L' (=8-bit) mode.

Parameters

img_t (Tensor) – monochrome image as tensor of size [height, width]

Returns

resized and darkened image of mode='L'

Return type

Image