def show_mask_single(images, mask, Mean=(2, 2, 2), Std=(0.5, 0.5, 0.5)):
    im_size = images.size(2)
    im_data = images.clone()
    for i in range(0, 3):
        im_data[:, i, :, :] = ((im_data[:, i, :, :] * Std[i]) + Mean[i])
    images = make_image(torchvision.utils.make_grid(images), Mean, Std)
    plt.subplot(2, 1, 1)
    plt.imshow(images)
    plt.axis('off')
    mask_size = mask.size(2)
    mask = upsampling(mask, scale_factor=(im_size / mask_size))
    mask = make_image(torchvision.utils.make_grid(((0.3 * im_data) + (0.7 * mask.expand_as(im_data)))))
    plt.subplot(2, 1, 2)
    plt.imshow(mask)
    plt.axis('off')
def show_mask_single(images, mask, Mean=(2, 2, 2), Std=(0.5, 0.5, 0.5)):
    im_size = images.size(2)
    im_data = images.clone()
    for i in range(0, 3):
        im_data[:, i, :, :] = ((im_data[:, i, :, :] * Std[i]) + Mean[i])
    images = make_image(torchvision.utils.make_grid(images), Mean, Std)
    plt.subplot(2, 1, 1)
    plt.imshow(images)
    plt.axis('off')
    mask_size = mask.size(2)
    mask = upsampling(mask, scale_factor=(im_size / mask_size))
    mask = make_image(torchvision.utils.make_grid(((0.3 * im_data) + (0.7 * mask.expand_as(im_data)))))
    plt.subplot(2, 1, 2)
    plt.imshow(mask)
    plt.axis('off')