def cal_metric(y_true, y_pred):
    (concatenate_true, concatenate_pred) = (np.concatenate(y_true, axis=(- 1)), np.concatenate(y_pred, axis=(- 1)))
    mae = metrics.mean_absolute_error(concatenate_true, concatenate_pred)
    r2 = metrics.r2_score(concatenate_true, concatenate_pred)
    return {'mae': mae, 'r2': r2}
def cal_metric(y_true, y_pred):
    (concatenate_true, concatenate_pred) = (np.concatenate(y_true, axis=(- 1)), np.concatenate(y_pred, axis=(- 1)))
    mae = metrics.mean_absolute_error(concatenate_true, concatenate_pred)
    r2 = metrics.r2_score(concatenate_true, concatenate_pred)
    return {'mae': mae, 'r2': r2}