You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行bug如下:ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (48000,) + inhomogeneous part.
Epoch: 10 cost time: 143.77790188789368
Epoch: 10, Steps: 26 | Train Loss: 14.3322291 Vali Loss: 33.2273196 Test Loss: 33.2273196
EarlyStopping counter: 1 out of 3
Updating learning rate to 1.953125e-06
testing : short_term_forecast_m4_Hourly_TimesNet_m4_ftM_sl96_ll48_pl48_dm32_nh8_el2_dl1_df32_expand2_dc4_fc3_ebtimeF_dtTrue_Exp_0<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
train 414
test 414
0
test shape: (414, 48, 1)
TimesNet
Traceback (most recent call last):
File "/home/bit/tslib/run.py", line 224, in
exp.test(setting)
File "/home/bit/tslib/exp/exp_short_term_forecasting.py", line 228, in test
smape_results, owa_results, mape, mase = m4_summary.evaluate()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bit/tslib/utils/m4_summary.py", line 67, in evaluate
naive2_forecasts = np.array([v[~np.isnan(v)] for v in naive2_forecasts])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (100000,) + inhomogeneous part.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
M4 数据集在加载时存在序列长度不一致的问题,导致readme训练与评测中第二个部分模型训练。
bash ./scripts/short_term_forecast/TimesNet_M4.sh
执行bug:
修改内容
data_provider/m4.py中数据解析逻辑,统一序列长度处理方式。验证方式
已通过 {insert_element_1_YHNjcmlwdHMvc2hvcnRfdGVybV9mb3JlY2FzdC9UaW1lc05ldF9NNC5zaGA=} 脚本测试,可正常运行 M4 数据集的短期预测任务,无长度不匹配报错。