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

Allow to set tensors parameter to control what is initialized #104

Merged
merged 1 commit into from
May 13, 2024

Conversation

BenjaminMidtvedt
Copy link
Collaborator

@BenjaminMidtvedt BenjaminMidtvedt commented May 6, 2024

You can now specify the tensors to be initialized during weight initialization. This is done with the tensors parameter:

initializer = Normal()
const = Constant()
model.initialize(initializer, tensors=("weight", "bias")) # bias and weights
model.initialize(initializer, tensors="weight") # only weight
model.initialize(const, tensors="bias")

@giovannivolpe giovannivolpe merged commit 71d7250 into develop May 13, 2024
12 checks passed
@giovannivolpe giovannivolpe deleted the bm/weight-initialization branch May 13, 2024 20:10
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