chengtan9907 / OpenSTL

OpenSTL: A Comprehensive Benchmark of Spatio-Temporal Predictive Learning
https://openstl.readthedocs.io/en/latest/
Apache License 2.0
730 stars 113 forks source link

weather t2m验证集结果问题 #124

Closed jlu-phyComputer closed 5 months ago

jlu-phyComputer commented 6 months ago

您好,我是中国科学院软件研究所计算机专业博一的学生,我在跑你代码时候出现了一些问题: 我使用SimVP_v2算法训练weather t2m数据集,验证集MSE loss和你的差不多也是0.0025左右,附上你的log: 2023-02-25 14:18:41,045 - val mse:1.1552700996398926, mae:0.6710056662559509, rmse:1.074834942817688 2023-02-25 14:18:41,046 - Intermediate result: 1.1552700996398926 (Index 13) 2023-02-25 14:18:41,065 - Epoch: 14, Steps: 3284 | Lr: 0.0042115 | Train Loss: 7.3083946 | Vali Loss: 0.0025748

2023-02-25 14:34:12,457 - val mse:1.141096591949463, mae:0.6559432744979858, rmse:1.0682212114334106 2023-02-25 14:34:12,458 - Intermediate result: 1.141096591949463 (Index 14) 2023-02-25 14:34:12,478 - Epoch: 15, Steps: 3284 | Lr: 0.0040937 | Train Loss: 6.8902757 | Vali Loss: 0.0025435 然而,你的这一行是怎么得到的阿: val mse:1.141096591949463, mae:0.6559432744979858, rmse:1.0682212114334106 weather数据集的数据形状为32乘以64,如果验证集平均MSE为0.0025,则求和MSE应该在0.0025乘以32乘以64=5附近,你是怎么得到1.141096591949463的啊,你的计算MSE的函数如下: def MSE(pred, true, spatial_norm=False): if not spatial_norm: return np.mean((pred-true)2, axis=(0, 1)).sum() else: norm = pred.shape[-1] pred.shape[-2] pred.shape[-3] return np.mean((pred-true)2 / norm, axis=(0, 1)).sum() 就是用来计算后两个维度([32, 64])的MSE的和的呀,在线等,很急,感谢大哥解释了

chengtan9907 commented 5 months ago

I will close this issue if there are no more questions. Please feel free to open a new issue when you have new questions.