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

Rounding sampling #380

Merged
merged 4 commits into from
Oct 25, 2024
Merged

Rounding sampling #380

merged 4 commits into from
Oct 25, 2024

Conversation

dchung0741
Copy link
Contributor

Fix rounding error in sampling.

Fix logic:

  • Round off the small negative number first
  • Renormalize the probability by the 1-norm so that is sums to 1.
  • Checks the 1-norm to make sure it is close to 1 before sampling

@dchung0741 dchung0741 requested a review from kwkbtr October 25, 2024 09:40
Copy link

@github-actions github-actions bot temporarily deployed to pull request October 25, 2024 09:45 Inactive
@kwkbtr kwkbtr merged commit ad56045 into main Oct 25, 2024
6 checks passed
@kwkbtr kwkbtr deleted the rounding_sampling branch October 25, 2024 09:49
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants