def METHOD_NAME(y, y_pred, window_size=11, size_average=True):
    img1 = torch.from_numpy(y)
    img2 = torch.from_numpy(y_pred)
    (channel, _, _) = img1.shape
    window = create_window(window_size, channel)
    if img1.is_cuda:
        window = window.cuda(img1.get_device())
    window = window.type_as(img1)
    return _ssim(img1, img2, window, window_size, channel, size_average)