Closed dtt355 closed 1 year ago
the data is the generated by the model, I just saw you have another question in different issue, I will reply there
seems deleted :)
https://mega.nz/folder/kT91jYpI#97GyTkVVUk97fzs1Oy4nBQ/folder/sW8UiBpT Yes, another problem has been solved, thank you very much! Is this linked data set the raw data after you preprocessed it? What data does each file hold?
(pytorch_gpu) root@13e519def43d:~/data1# python /root/data1/data/12-lead-generator/SSSD-ECG-main/src/sssd/inference.py
/root/data1/data/12-lead-generator/SSSD-ECG-main/src/sssd/models/SSSD_ECG.py:177: SyntaxWarning: "is not" with a literal. Did you mean "!="?
self.embedding = nn.Embedding(label_embed_classes, label_embed_dim) if label_embed_classes>0 is not None else None
CUDA extension for cauchy multiplication not found. Install by going to extensions/cauchy/ and running python setup.py install
. This should speed up end-to-end training by 10-50%
Falling back on slow Cauchy kernel. Install at least one of pykeops or the CUDA extension for efficiency.
{'diffusion_config': {'T': 200, 'beta_0': 0.0001, 'beta_T': 0.02}, 'wavenet_config': {'in_channels': 8, 'out_channels': 8, 'num_res_layers': 36, 'res_channels': 256, 'skip_channels': 256, 'diffusion_step_embed_dim_in': 128, 'diffusion_step_embed_dim_mid': 512, 'diffusion_step_embed_dim_out': 512, 's4_lmax': 1000, 's4_d_state': 64, 's4_dropout': 0.0, 's4_bidirectional': 1, 's4_layernorm': 1, 'label_embed_dim': 128, 'label_embed_classes': 71}, 'train_config': {'output_directory': 'sssd_label_cond', 'ckpt_iter': 'max', 'iters_per_ckpt': 4000, 'iters_per_logging': 100, 'n_iters': 100000, 'learning_rate': 0.0002, 'batch_size': 8, 'masking': '', 'missing_k': ''}, 'trainset_config': {'segment_length': 1000, 'sampling_rate': 100, 'finetune_dataset': 'ptbxl_all', 'data_path': '/root/data1/data/12-lead-generator/Dataset/data/ptbxl_test_data.npy'}, 'gen_config': {'output_directory': 'sssd_label_cond', 'ckpt_path': 'sssd_label_cond/'}}
output directory sssd_label_cond/ch256_T200_betaT0.02
SSSD_ECG Parameters: 50.202504M
Successfully loaded model at iteration 100000
begin sampling, total number of reverse steps = 200
generated 400 utterances of random_digit at iteration 100000 in 1273 seconds
saved generated samples at iteration 100000
saved generated samples at iteration 100000
begin sampling, total number of reverse steps = 200
generated 400 utterances of random_digit at iteration 100000 in 1296 seconds
saved generated samples at iteration 100000
saved generated samples at iteration 100000
begin sampling, total number of reverse steps = 200
generated 400 utterances of random_digit at iteration 100000 in 1290 seconds
saved generated samples at iteration 100000
saved generated samples at iteration 100000
begin sampling, total number of reverse steps = 200
generated 400 utterances of random_digit at iteration 100000 in 1299 seconds
saved generated samples at iteration 100000
saved generated samples at iteration 100000
begin sampling, total number of reverse steps = 200
generated 400 utterances of random_digit at iteration 100000 in 1286 seconds
saved generated samples at iteration 100000
saved generated samples at iteration 100000
begin sampling, total number of reverse steps = 200
Traceback (most recent call last):
File "/root/data1/data/12-lead-generator/SSSD-ECG-main/src/sssd/inference.py", line 156, in
File "/root/anaconda3/envs/pytorch_gpu/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/root/data1/data/12-lead-generator/SSSD-ECG-main/src/sssd/models/SSSD_ECG.py", line 98, in forward
h = h + label_embed
RuntimeError: The size of tensor a (400) must match the size of tensor b (15441) at non-singleton dimension 0
There is also a problem. When I load labels in the generated data file, the defined load label link is the tag file ptbxl_train_labels.npy, but the above error occurs at run time. Why is this?Thank you very much!
extrac the signals and labels from here: https://github.com/AI4HealthUOL/SSSD-ECG/blob/main/src/ptb_xl/ecg_data_preprocessing.ipynb
you have to load the signals e.g. 17441, 12, 1000, and the labels e.g. 17441,71. Labels that will be converted to 17441,128 after the embedding.
the code must run as indicated
https://figshare.com/s/43df16e4a50e4dd0a0c5 May I ask whether the data in this link is the data after preprocessing of the original data set or the data generated by the model?Thank you!