-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
add quintic spline quantization strategy to sir_hmc.py #2434
Conversation
lmk if i should add new args to test_examples |
Could you add test args to 'sir_hmc.py -t=2 -w=2 -n=4 -d=100 -p=10000 -f 2 -s0=5', |
examples/sir_hmc.py
Outdated
|
||
q = pyro.sample("Q_" + name, dist.Categorical(probs)).type_as(x_real) | ||
|
||
x = lb + q - 1 if spline_order == 3 else lb + q - 3 |
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.
nit: consider simplifying to
x = lb + q - {3: 1, 5: 3}[spline_order]
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.
done
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.
done
addresses #2426