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

i have a question in your code about data_loader.py #80

Closed
miner58 opened this issue May 14, 2024 · 3 comments
Closed

i have a question in your code about data_loader.py #80

miner58 opened this issue May 14, 2024 · 3 comments

Comments

@miner58
Copy link

miner58 commented May 14, 2024

You use this code.

def len(self):
return (len(self.data_x) - self.seq_len - self.pred_len + 1) * self.enc_in

I change above code to

def len(self):
return (len(self.data_x) - self.seq_len - self.pred_len + 1)

then batch change like this: first is original code and second is my version
i use this code for print
print("Data Set Settings:")
print(f"Root Path: {data_set.root_path}")
print(f"Data Path: {data_set.data_path}")
print(f"Features: {data_set.features}")
print(f"Target: {data_set.target}")
print(f"Time Encoding: {data_set.timeenc}")
print(f"Frequency: {data_set.freq}")
print(f"Percent: {data_set.percent}")

print("\nData Loader Settings:")
print(f"Batch Size: {data_loader.batch_size}")
print(f"Number of Workers: {data_loader.num_workers}")
print(f"Drop Last: {data_loader.drop_last}")

total_samples = len(data_set)
total_batches = len(data_loader)
print(f"\nTotal number of samples in dataset: {total_samples}")
print(f"Total number of batches: {total_batches}")

스크린샷 2024-05-15 013429

스크린샷 2024-05-15 013352

@valentynariabchuk
Copy link

Hi, they "flatten" input features into one column. So, I did not work with electricity dataset, but it seems that you just have the length of the first feature. Check theirs getitem function :)

@kwuking
Copy link
Collaborator

kwuking commented May 15, 2024

Hi, it seems that I haven't fully understood your question. Could you please specify what your issue is? It appears to be similar to this issue; you might want to take a look for reference.

@miner58
Copy link
Author

miner58 commented May 15, 2024

thanks for your replies, I understood why 'flatten' channel in dataloader.
But it seems like too many time cost to run training ECL 'M' in two A6000.

@kwuking kwuking closed this as completed May 22, 2024
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

3 participants