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

Test Cases with Input Shape (-1, 7) #48

Closed
DarrenZhang01 opened this issue Jul 14, 2020 · 2 comments
Closed

Test Cases with Input Shape (-1, 7) #48

DarrenZhang01 opened this issue Jul 14, 2020 · 2 comments

Comments

@DarrenZhang01
Copy link
Contributor

Hi, could you confirm that the input is (-1, 7) in https://github.com/google/neural-tangents/blob/master/tests/stax_test.py#L1017? Since this is not reshaping, what does -1 represent here as the first dimension? Thanks!

@romanngg
Copy link
Contributor

I think this just means it's not being used, or used in places where the actualized size at axis 0 can be inferred from the context. E.g. by default the leading dimension is the batch dimension, that does not influence how parameters of the Dense layer are initialized. I imagine it could error if any other dimension is -1, or if batch_axis != 0 (but it might also work, if again, the size where -1 is used can be inferred from the context).

It may be cleaner to just pass X0_1.shape there though.

@DarrenZhang01
Copy link
Contributor Author

I see, thanks!

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