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

fix bugs in truncated_normal; add TruncatedNormal init. #575

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

charlielam0615
Copy link
Collaborator

@charlielam0615 charlielam0615 commented Jan 1, 2024

Description

  1. random.truncated_normal is not properly truncated.
  2. add support for TruncatedNormal initialization
    bug fix is a re-implementation of PR#574, also fix bugs therein.
    Passed local test.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • Code follows the code style of this project.
  • Changes follow the CONTRIBUTING guidelines.
  • Update necessary documentation accordingly.
  • Lint and tests pass locally with the changes.
  • Check issues and pull requests first. You don't want to duplicate effort.

Other information

Copy link
Collaborator

@chaoming0625 chaoming0625 left a comment

Choose a reason for hiding this comment

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

I think we should first merge #574, then merge the latest changes, and finnally the brainpy.init.TruncatedNormal should work.

Moreover, please add the new APIs into the bainpy.intialize module and corresponding doc in docs\apis\initialize.rst

brainpy/_src/math/random.py Outdated Show resolved Hide resolved
brainpy/_src/initialize/random_inits.py Show resolved Hide resolved
@charlielam0615
Copy link
Collaborator Author

@chaoming0625
PR #574 merged.
New API added.

Copy link
Collaborator

@chaoming0625 chaoming0625 left a comment

Choose a reason for hiding this comment

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

So great PR!

@chaoming0625 chaoming0625 merged commit d0988a0 into brainpy:master Jan 2, 2024
15 checks passed
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