示例#1
0
def superloss_10(y_true, y_pred):
    loss_sobel = sobelLoss_mse(y_true, y_pred)
    dssim = DSSIMObjective(kernel_size=5)
    loss_dssim = dssim(y_true, y_pred)
    loss_mae = keras.losses.mae(y_true, y_pred)
    loss_mse = keras.losses.mse(y_true, y_pred)
    return 0.3 * loss_sobel + 0.3 * loss_dssim + 0.2 * loss_mse + 0.2 * loss_mae
示例#2
0
def superloss_9(y_true, y_pred):
    loss_sobel = sobelLoss_mse(y_true, y_pred)
    dssim = DSSIMObjective()
    loss_dssim = dssim(y_true, y_pred)
    loss_mae = keras.losses.mae(y_true, y_pred)
    loss_mse = keras.losses.mse(y_true, y_pred)
    return 0.4 * loss_sobel + 0.4 * loss_dssim + 0.1 * loss_mse + 0.1 * loss_mae
示例#3
0
def superloss_8(y_true, y_pred):
    dssim = DSSIMObjective()
    dstsim = DSTSIMObjective()
    loss_mae = keras.losses.mae(y_true, y_pred)
    loss_mse = keras.losses.mse(y_true, y_pred)
    loss_dssim = dssim(y_true, y_pred)
    loss_dstsim = dstsim(y_true, y_pred)
    #loss_dstsim = K.print_tensor(loss_dstsim, message='loss_stsim')
    #loss_dssim = K.print_tensor(loss_dssim, message='loss_ssim')
    return 0.4 * loss_mse + 0.4 * loss_dstsim + 0.2 * loss_mae
示例#4
0
def superloss_7(y_true, y_pred):
    dssim = DSSIMObjective()
    loss_mae = keras.losses.mae(y_true, y_pred)
    loss_mse = keras.losses.mse(y_true, y_pred)
    loss_dssim = dssim(y_true, y_pred)
    return 0.5 * loss_dssim + 0.3 * loss_mae + 0.2 * loss_mse
示例#5
0
def superloss_6(y_true, y_pred):
    dssim = DSSIMObjective(kernel_size=5)
    loss_mae = keras.losses.mae(y_true, y_pred)
    loss_mse = keras.losses.mse(y_true, y_pred)
    loss_dssim = dssim(y_true, y_pred)
    return 0.4 * loss_dssim + 0.5 * loss_mae + 0.1 * loss_mse