davecasp / flowssm

MIT License
22 stars 6 forks source link

about generate_template #5

Open YangZiz opened 8 months ago

YangZiz commented 8 months ago

I want to train my own data template. Do I need to preprocess the data before running generate_template? For example, centering, scaling, etc., I didn't do these things, but I made the following errors

File "/home/jianjian/anaconda3/envs/HRN/lib/python3.8/site-packages/torchdiffeq/_impl/rk_common.py", line 265, in _adaptive_step
    assert t0 + dt > t0, 'underflow in dt {}'.format(dt.item())
AssertionError: underflow in dt 0.0

I want to know if it's a problem that I didn't preprocess

davecasp commented 8 months ago

With this limited information, it is hard to know the exact cause. Generally, this underflow of torchdiffeq can indicate that the ODE is too stiff to be solved (see e.g. https://github.com/rtqichen/torchdiffeq/issues/57#issuecomment-498684738). A missing alignment or wrong scaling could cause this; however, it could also be caused by something else. I suggest you try some ICP alignment of the shapes and re-run the generate_template script.