Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

two questions about timer #27

Open
zxl696 opened this issue Nov 11, 2024 · 1 comment
Open

two questions about timer #27

zxl696 opened this issue Nov 11, 2024 · 1 comment

Comments

@zxl696
Copy link

zxl696 commented Nov 11, 2024

  1.            if self.args.use_ims:
                 # output used to calculate loss misaligned patch_len compared to input
                 loss = criterion(outputs[:, -self.args.seq_len:, :], batch_y)
             else:
                 # only use the forecast window to calculate loss
                 loss = criterion(outputs[:, -self.args.pred_len:, :], batch_y[:, -self.args.pred_len:, :])
    

代码这里的计算损失为什么是这样的,使用ims为啥这样计算损失,训练函数里面也没看出来使用ims他的训练逻辑
2. if self.data_type == 'custom':
data_len = len(df_raw)
num_train = int(data_len * 0.75)
num_test = int(data_len * 0.15)
num_vali = data_len - num_train - num_test
border1s = [0, num_train-self.input_len, data_len - num_test-self.input_len]
border2s = [num_train, num_train + num_vali, data_len]
这样分配起始点会不会造成测试集和验证集提前知道数据了

@WenWeiTHU
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants