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 binom factor notebook #123

Merged
merged 3 commits into from
Oct 10, 2023
Merged

Add binom factor notebook #123

merged 3 commits into from
Oct 10, 2023

Conversation

awf
Copy link
Collaborator

@awf awf commented Oct 9, 2023

The function called "binom factor" is one of those with a variable-sized loop,
which is tricky to vectorize. This notebook shows a strategy that might be helpful.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,521 @@
{
Copy link
Contributor

@hatemhelal hatemhelal Oct 10, 2023

Choose a reason for hiding this comment

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

Line #5.      print("# AUTOGENERATED from notebooks/binom_factor_table.ipynb", file=f)

I think the linters are complaining as this doesn't have a copyright and fails the black formatter. Could you try changing this to:

print("# Copyright (c) 2023 Graphcore Ltd. All rights reserved.", file=f)

print("# AUTOGENERATED from notebooks/binom_factor_table.ipynb", file=f)
print("# fmt: off", file=f)



Reply via ReviewNB

@hatemhelal
Copy link
Contributor

Neat solution, I remembered another reference that has a derivation for the binomial factor:

http://arxiv.org/abs/2007.12057

I think the double summation in 2.45 might be useful comparison here

Copy link
Contributor

@hatemhelal hatemhelal left a comment

Choose a reason for hiding this comment

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

🚢

@awf awf merged commit 9a1e9b3 into main Oct 10, 2023
@awf awf deleted the awf/binom_lookup branch October 10, 2023 12:01
awf added a commit that referenced this pull request Oct 10, 2023
@awf awf restored the awf/binom_lookup branch October 10, 2023 14:59
@awf awf mentioned this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants