Skip to content

Correct way to initialize model #2868

Answered by cgarciae
averageFlaxUser asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @averageFlaxUser, most Flax layers support multiple batch dimensions and even having no batch dimension. That said to be safe I usually initialize with a batch dimension of 1 so jnp.ones([1, 784]) is probably what I would use.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@averageFlaxUser
Comment options

Answer selected by averageFlaxUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants