-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alex/add eps #124
base: main
Are you sure you want to change the base?
Alex/add eps #124
Conversation
@@ -115,13 +123,14 @@ def test_fm(method, sigma, shape): | |||
x0, x1 = sample_plan(method, x0, x1, sigma) | |||
|
|||
torch.manual_seed(TEST_SEED) | |||
if test_eps: | |||
# compute to get same t seed | |||
eps = torch.randn_like(x0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this one used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay I get it. Why don't you give eps instead of ret_eps in line 132 and drop the comment? esp and ret_eps are supposed the be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to test that they are the same? Make sure we didn't mess anything up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh no we can't do that. It messes up the seeds for later inits.
x0, x1, return_noise=True, eps=eps | ||
) | ||
if test_eps: | ||
assert torch.allclose(ret_eps, eps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this assert should be done at the end of the file. eps is supposed to be the same as ret_eps and it is in the same spirit as the tests over t_given_init
return torch.randn_like(x) | ||
|
||
def sample_location_and_conditional_flow(self, x0, x1, t=None, return_noise=False): | ||
def sample_location_and_conditional_flow(self, x0, x1, t=None, return_noise=False, eps=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you run some notebooks to ensure the behaviour is still correct please? thx.
add fixed
epsilon
option following #122