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 LayerNorm, RMSNorm, GroupNorm #43

Merged
merged 2 commits into from
Nov 29, 2024
Merged

add LayerNorm, RMSNorm, GroupNorm #43

merged 2 commits into from
Nov 29, 2024

Conversation

chaoming0625
Copy link
Collaborator

This pull request includes updates to the brainstate/nn/_elementwise/_dropout.py file to improve the handling of dropout probability and mask generation during the fitting process.

Changes to dropout probability handling:

  • Updated the assertion in the __init__ methods to allow a dropout probability of 1.0, changing the range from [0, 1) to [0, 1]. [1] [2]

Changes to mask generation:

  • Modified the __call__ method to include a condition that checks if the dropout probability is less than 1.0 before generating the mask during the fitting phase.
  • Updated the init_state method to include a similar condition, ensuring the mask is generated only if the dropout probability is less than 1.0 during the fitting phase.

@chaoming0625 chaoming0625 marked this pull request as ready for review November 29, 2024 09:08
@chaoming0625 chaoming0625 merged commit 93385b8 into main Nov 29, 2024
22 checks passed
@chaoming0625 chaoming0625 deleted the udate branch November 29, 2024 09:09
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.

1 participant