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

How to calculate all trainable parameters?? #3

Open
tuandv2021 opened this issue May 10, 2022 · 1 comment
Open

How to calculate all trainable parameters?? #3

tuandv2021 opened this issue May 10, 2022 · 1 comment

Comments

@tuandv2021
Copy link

Thanks so much for the nice implementation.
I just have a question about parameter.

How can I calculate all trainable parameters in this model?
I have tried mlpmixer.summary(), but i do not work.

@bangoc123
Copy link
Owner

@tuandv2021 yes, it is custom model so we are unable to use summary(), you can calculate using shape of params of each layer and sum them up.

 self.W1 = tf.Variable(
            initial_value=w_init(shape=(S, DS), dtype="float32"),
            trainable=True,
    )

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

2 participants