Skip to content
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

Merged
merged 4 commits into from
Apr 23, 2020
Merged

Conversation

martinjankowiak
Copy link
Collaborator

@martinjankowiak martinjankowiak commented Apr 22, 2020

addresses #2426

@martinjankowiak
Copy link
Collaborator Author

lmk if i should add new args to test_examples

fritzo
fritzo previously approved these changes Apr 23, 2020
@fritzo
Copy link
Member

fritzo commented Apr 23, 2020

Could you add test args to test_examples.py:

'sir_hmc.py -t=2 -w=2 -n=4 -d=100 -p=10000 -f 2 -s0=5',


q = pyro.sample("Q_" + name, dist.Categorical(probs)).type_as(x_real)

x = lb + q - 1 if spline_order == 3 else lb + q - 3
Copy link
Member

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]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

examples/sir_hmc.py Outdated Show resolved Hide resolved
@fritzo fritzo merged commit 999822f into dev Apr 23, 2020
@martinjankowiak martinjankowiak deleted the sir_quant branch April 24, 2020 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants