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

Haiku initialization #606

Open
adhikarirsr opened this issue Feb 22, 2023 · 0 comments
Open

Haiku initialization #606

adhikarirsr opened this issue Feb 22, 2023 · 0 comments

Comments

@adhikarirsr
Copy link

Pytorch initialization:

def reset_parameters(self):
        stdv = 1. / math.sqrt(self.weight.size(1))
        self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)

Is the above initialization equivalent to :
hk.Linear(hidden_size, with_bias=True, w_init=VarianceScaling(1.0, 'fan_in', 'uniform'),b_init= VarianceScaling(1.0, 'fan_in', 'uniform'))

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

No branches or pull requests

1 participant