AI4HealthUOL / SSSD-ECG

Repository for the paper: 'Diffusion-based Conditional ECG Generation with Structured State Space Models'
MIT License
42 stars 6 forks source link

How to train using any data? #1

Closed mona251 closed 1 year ago

mona251 commented 1 year ago

Hello, I've tried to make your code work on my environment by simply only running train.py but I already stumble into an error:

SSSD_ECG.py tries to import from S4Model.py:

from models.S4Model import S4Layer

but there are no class or function that was named "S4Layer", I thought it might have been a mistake, and that it should be the class S4 so I changed the name of the class calls from "S4Layer" to "S4" which I assume was the class to be fetched but it gives me:

TypeError: __init__() missing 1 required positional argument: 'd_model'

Is there a possibility to add instructions to the readme?

Thanks in advance! And great work.

juanlopezcode commented 1 year ago

Hello @mona251, thank you for your observation. Indeed, there was missing in the S4Model file a custom S4Layer class, I have added it to the file and it should work now.