【报错】 rmse = mean_absolute_error(r_pre, r_env) ValueError: Found input variables with inconsistent numbers of samples: [1, 7] 原因:找到样本数不一致的输入变量:[1,7]。 解决:察觉到r_pre.shape=(1,7,1),而r_env.shape=(7,).修正即可。