atong01 / conditional-flow-matching

TorchCFM: a Conditional Flow Matching library
https://arxiv.org/abs/2302.00482
MIT License
1.25k stars 101 forks source link

Add sigma test #77

Closed guillaumehu closed 1 year ago

guillaumehu commented 1 year ago

What does this PR do?

Hello @kilianFatras, as discussed in the other PR I have added a test for sigma. I also merged the tests into one function, since a lot of the code was reused across the tests.

I tried the tests with the small fix for sigma, and it catches two errors: for SB-CFM sigma has to be greater than 0, and for TargetConditionalFlowMatcher sigma has to be lower or equal than 1. Maybe we should raise an error at the initialization of these classes if sigma is not in the correct range.

Fixes #\

Before submitting

Did you have fun?

Make sure you had fun coding 🙃