个人技术分享

Parameters:
input – Tensor of predicted values with shape of (n_sample, n_output).
target – Tensor of ground truth values with shape of (n_sample, n_output).

https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html
sklearn.metrics.r2_score(y_true, y_pred, *, sample_weight=None, multioutput=‘uniform_average’, force_finite=True)

y_true: Ground truth (correct) target values.
y_pred: Estimated target values.