How to train ptb-xl dataset?
HarperHao opened this issue · 4 comments
Hello, it is because the data we provided for the sample run is in the shape of L length and K channels I believe, and PTB-XL is on the shape of B,K,L? So you wouldn't give an extra split as you already have batches.
Thank you very much for your reply! I debug the train.py, I found that the shape of the loaded data is not B, K, L.And it is 17441X12X100.So, according to the paper, it still needs to be splited.
Let me elaborate on the process of running the code.
- I run get_data.py to get train_ptbxl_1000.npy、test_ptbxl_1000.npy and val_ptbxl_1000.npy.
- I modified the config_SSSDS4.json file, changing the in_channels and out_channels to 12.
- I run train.py and I encountered the bug mentioned above.
Looking forward to your reply again.
The splitting line is not requiered for PTB-XL.
17441 is number of samples, 12 the channels, and 1000 the length.
depending on your gpu you might be able to pass small or large batches into the model. example 4,12,1000.
For PTB-XL I would recommend you use pytorch dataloaders to split the data into desired batches.
Hope this helps
Thanks for your suggestion! I modified the code as you suggested. The code runs successfully! It is being trained. I must thank you again!