Skip to content

消融实验是否真正进行,变长Patch划分是否真的有用,PaEn_loss怎么正常的进行参数学习 #6

Description

@cooker-coder

在模型主干部分,将Pane_loss手动设置为0.且不使用Patch变长划分方法。得到如下实验结果:

Image

Image
完整实验日志:
D:\Anaconda\envs\iTransformer\python.exe D:\project\HDMixer-master\run_longExp.py --is_training 1 --model_id test --model HDMixer
Args in experiment:
Namespace(mix_time=1, mix_variable=1, mix_channel=1, deform_patch=0, deform_range=0.25, lambda_=0.1, r=0.01, mlp_ratio=1.0, window_size=6, shift_size=3, weight_decay=0.001, random_seed=2021, is_training=1, model_id='test', model='HDMixer', data='ETTh1', root_path='./dataset/', data_path='ETTh1.csv', features='M', target='OT', freq='h', checkpoints='./checkpoints/', seq_len=336, label_len=48, pred_len=96, fc_dropout=0.3, head_dropout=0.0, patch_len=16, stride=8, padding_patch='end', revin=1, affine=0, subtract_last=0, decomposition=0, kernel_size=25, individual=0, embed_type=0, enc_in=7, dec_in=7, c_out=7, d_model=16, n_heads=4, e_layers=1, d_layers=1, d_ff=32, moving_avg=25, factor=1, distil=True, dropout=0.8, embed='timeF', activation='gelu', output_attention=True, do_predict=True, num_workers=0, itr=1, train_epochs=50, batch_size=512, patience=20, learning_rate=0.005, des='Exp', loss='mse', lradj='type3', pct_start=0.3, use_amp=False, use_gpu=True, gpu=0, use_multi_gpu=False, devices='4,5,6,7', test_flop=False)
Use GPU: cuda:0
41
42

start training : test_HDMixer_ETTh1_ftM_sl336_ll48_pl96_dm16_nh4_el1_dl1_df32_fc1_ebtimeF_dtTrue_Exp_0>>>>>>>>>>>>>>>>>>>>>>>>>>
train 8209
val 2785
test 2785

Epoch: 1 cost time: 0.4792213439941406
Epoch: 1, Steps: 16 | Train Loss: 0.6970009 Vali Loss: 1.0869455 Test Loss: 0.5323638
Validation loss decreased (inf --> 1.086946). Saving model ...
Updating learning rate to 0.005

Epoch: 2 cost time: 0.2640256881713867
Epoch: 2, Steps: 16 | Train Loss: 0.6260976 Vali Loss: 0.9772700 Test Loss: 0.5195729
Validation loss decreased (1.086946 --> 0.977270). Saving model ...
Updating learning rate to 0.005

Epoch: 3 cost time: 0.26801466941833496
Epoch: 3, Steps: 16 | Train Loss: 0.4422899 Vali Loss: 0.7530154 Test Loss: 0.4579403
Validation loss decreased (0.977270 --> 0.753015). Saving model ...
Updating learning rate to 0.005

Epoch: 4 cost time: 0.26700329780578613
Epoch: 4, Steps: 16 | Train Loss: 0.3889118 Vali Loss: 0.7376963 Test Loss: 0.3982546
Validation loss decreased (0.753015 --> 0.737696). Saving model ...
Updating learning rate to 0.0045000000000000005

Epoch: 5 cost time: 0.27027344703674316
Epoch: 5, Steps: 16 | Train Loss: 0.3626329 Vali Loss: 0.6873276 Test Loss: 0.3911011
Validation loss decreased (0.737696 --> 0.687328). Saving model ...
Updating learning rate to 0.004050000000000001

Epoch: 6 cost time: 0.2700023651123047
Epoch: 6, Steps: 16 | Train Loss: 0.3479787 Vali Loss: 0.6780385 Test Loss: 0.3767796
Validation loss decreased (0.687328 --> 0.678038). Saving model ...
Updating learning rate to 0.0036450000000000007

Epoch: 7 cost time: 0.26932525634765625
Epoch: 7, Steps: 16 | Train Loss: 0.3428182 Vali Loss: 0.6805835 Test Loss: 0.3700825
EarlyStopping counter: 1 out of 20
Updating learning rate to 0.0032805

Epoch: 8 cost time: 0.2701568603515625
Epoch: 8, Steps: 16 | Train Loss: 0.3396684 Vali Loss: 0.6660573 Test Loss: 0.3697884
Validation loss decreased (0.678038 --> 0.666057). Saving model ...
Updating learning rate to 0.0029524500000000006

Epoch: 9 cost time: 0.28374457359313965
Epoch: 9, Steps: 16 | Train Loss: 0.3381216 Vali Loss: 0.6794029 Test Loss: 0.3658020
EarlyStopping counter: 1 out of 20
Updating learning rate to 0.002657205

Epoch: 10 cost time: 0.26601290702819824
Epoch: 10, Steps: 16 | Train Loss: 0.3369397 Vali Loss: 0.6707555 Test Loss: 0.3663085
EarlyStopping counter: 2 out of 20
Updating learning rate to 0.0023914845000000003

Epoch: 11 cost time: 0.26800107955932617
Epoch: 11, Steps: 16 | Train Loss: 0.3363151 Vali Loss: 0.6673336 Test Loss: 0.3646697
EarlyStopping counter: 3 out of 20
Updating learning rate to 0.0021523360500000006

Epoch: 12 cost time: 0.26697278022766113
Epoch: 12, Steps: 16 | Train Loss: 0.3359175 Vali Loss: 0.6708089 Test Loss: 0.3654612
EarlyStopping counter: 4 out of 20
Updating learning rate to 0.0019371024450000004

Epoch: 13 cost time: 0.2676119804382324
Epoch: 13, Steps: 16 | Train Loss: 0.3356292 Vali Loss: 0.6697249 Test Loss: 0.3642505
EarlyStopping counter: 5 out of 20
Updating learning rate to 0.0017433922005000006

Epoch: 14 cost time: 0.2702009677886963
Epoch: 14, Steps: 16 | Train Loss: 0.3353219 Vali Loss: 0.6727983 Test Loss: 0.3644657
EarlyStopping counter: 6 out of 20
Updating learning rate to 0.0015690529804500003

Epoch: 15 cost time: 0.2720067501068115
Epoch: 15, Steps: 16 | Train Loss: 0.3349026 Vali Loss: 0.6730704 Test Loss: 0.3643808
EarlyStopping counter: 7 out of 20
Updating learning rate to 0.0014121476824050007

Epoch: 16 cost time: 0.2844867706298828
Epoch: 16, Steps: 16 | Train Loss: 0.3349119 Vali Loss: 0.6706899 Test Loss: 0.3641191
EarlyStopping counter: 8 out of 20
Updating learning rate to 0.0012709329141645004

Epoch: 17 cost time: 0.26850175857543945
Epoch: 17, Steps: 16 | Train Loss: 0.3348218 Vali Loss: 0.6739876 Test Loss: 0.3640708
EarlyStopping counter: 9 out of 20
Updating learning rate to 0.0011438396227480504

Epoch: 18 cost time: 0.27217555046081543
Epoch: 18, Steps: 16 | Train Loss: 0.3344863 Vali Loss: 0.6649176 Test Loss: 0.3637382
Validation loss decreased (0.666057 --> 0.664918). Saving model ...
Updating learning rate to 0.0010294556604732454

Epoch: 19 cost time: 0.26722288131713867
Epoch: 19, Steps: 16 | Train Loss: 0.3343521 Vali Loss: 0.6679214 Test Loss: 0.3641189
EarlyStopping counter: 1 out of 20
Updating learning rate to 0.0009265100944259208

Epoch: 20 cost time: 0.2639956474304199
Epoch: 20, Steps: 16 | Train Loss: 0.3341514 Vali Loss: 0.6696994 Test Loss: 0.3638243
EarlyStopping counter: 2 out of 20
Updating learning rate to 0.0008338590849833288

Epoch: 21 cost time: 0.2739288806915283
Epoch: 21, Steps: 16 | Train Loss: 0.3343266 Vali Loss: 0.6666123 Test Loss: 0.3635328
EarlyStopping counter: 3 out of 20
Updating learning rate to 0.0007504731764849959

Epoch: 22 cost time: 0.28064680099487305
Epoch: 22, Steps: 16 | Train Loss: 0.3341014 Vali Loss: 0.6711146 Test Loss: 0.3637099
EarlyStopping counter: 4 out of 20
Updating learning rate to 0.0006754258588364964

Epoch: 23 cost time: 0.27042412757873535
Epoch: 23, Steps: 16 | Train Loss: 0.3342334 Vali Loss: 0.6717736 Test Loss: 0.3640175
EarlyStopping counter: 5 out of 20
Updating learning rate to 0.0006078832729528468

Epoch: 24 cost time: 0.2941441535949707
Epoch: 24, Steps: 16 | Train Loss: 0.3342039 Vali Loss: 0.6736273 Test Loss: 0.3632407
EarlyStopping counter: 6 out of 20
Updating learning rate to 0.0005470949456575622

Epoch: 25 cost time: 0.2786116600036621
Epoch: 25, Steps: 16 | Train Loss: 0.3339713 Vali Loss: 0.6671935 Test Loss: 0.3636402
EarlyStopping counter: 7 out of 20
Updating learning rate to 0.0004923854510918059

Epoch: 26 cost time: 0.2823636531829834
Epoch: 26, Steps: 16 | Train Loss: 0.3339507 Vali Loss: 0.6698967 Test Loss: 0.3636934
EarlyStopping counter: 8 out of 20
Updating learning rate to 0.00044314690598262535

Epoch: 27 cost time: 0.2686622142791748
Epoch: 27, Steps: 16 | Train Loss: 0.3337385 Vali Loss: 0.6671231 Test Loss: 0.3634807
EarlyStopping counter: 9 out of 20
Updating learning rate to 0.0003988322153843628

Epoch: 28 cost time: 0.2706575393676758
Epoch: 28, Steps: 16 | Train Loss: 0.3337661 Vali Loss: 0.6692212 Test Loss: 0.3635621
EarlyStopping counter: 10 out of 20
Updating learning rate to 0.0003589489938459265

Epoch: 29 cost time: 0.2756321430206299
Epoch: 29, Steps: 16 | Train Loss: 0.3339321 Vali Loss: 0.6690661 Test Loss: 0.3636963
EarlyStopping counter: 11 out of 20
Updating learning rate to 0.00032305409446133386

Epoch: 30 cost time: 0.2682504653930664
Epoch: 30, Steps: 16 | Train Loss: 0.3339566 Vali Loss: 0.6705001 Test Loss: 0.3636905
EarlyStopping counter: 12 out of 20
Updating learning rate to 0.0002907486850152005

Epoch: 31 cost time: 0.2700002193450928
Epoch: 31, Steps: 16 | Train Loss: 0.3339658 Vali Loss: 0.6708741 Test Loss: 0.3634060
EarlyStopping counter: 13 out of 20
Updating learning rate to 0.0002616738165136805

Epoch: 32 cost time: 0.2805604934692383
Epoch: 32, Steps: 16 | Train Loss: 0.3339972 Vali Loss: 0.6701417 Test Loss: 0.3635286
EarlyStopping counter: 14 out of 20
Updating learning rate to 0.00023550643486231244

Epoch: 33 cost time: 0.273252010345459
Epoch: 33, Steps: 16 | Train Loss: 0.3336993 Vali Loss: 0.6769592 Test Loss: 0.3633735
EarlyStopping counter: 15 out of 20
Updating learning rate to 0.0002119557913760812

Epoch: 34 cost time: 0.2915949821472168
Epoch: 34, Steps: 16 | Train Loss: 0.3338362 Vali Loss: 0.6752858 Test Loss: 0.3634149
EarlyStopping counter: 16 out of 20
Updating learning rate to 0.00019076021223847308

Epoch: 35 cost time: 0.28769588470458984
Epoch: 35, Steps: 16 | Train Loss: 0.3337940 Vali Loss: 0.6715749 Test Loss: 0.3633811
EarlyStopping counter: 17 out of 20
Updating learning rate to 0.00017168419101462577
Epoch: 36 cost time: 0.29315876960754395
Epoch: 36, Steps: 16 | Train Loss: 0.3337394 Vali Loss: 0.6721165 Test Loss: 0.3634064
EarlyStopping counter: 18 out of 20
Updating learning rate to 0.00015451577191316317
Epoch: 37 cost time: 0.29315996170043945
Epoch: 37, Steps: 16 | Train Loss: 0.3334903 Vali Loss: 0.6692940 Test Loss: 0.3634848
EarlyStopping counter: 19 out of 20
Updating learning rate to 0.00013906419472184688

Epoch: 38 cost time: 0.2873845100402832
Epoch: 38, Steps: 16 | Train Loss: 0.3336127 Vali Loss: 0.6707417 Test Loss: 0.3634249
EarlyStopping counter: 20 out of 20
Early stopping

testing : test_HDMixer_ETTh1_ftM_sl336_ll48_pl96_dm16_nh4_el1_dl1_df32_fc1_ebtimeF_dtTrue_Exp_0<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test 2785
mse:0.3637380599975586, mae:0.3900781273841858, rse:0.5743133425712585

结果优于论文中的HDMixer呈现出来的准确度.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions