You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For very complex models, it is usually nice to initialize some feature dimensions automatically from output shape data. nnx.eval_shape facilitates this by allowing users to compute the output shape of model components without expensive FLOPs or memory allocation.
Unfortunately, any model component that uses BatchNorm will not be able to be evaluated as such. See minimal example below.
It would be nice if this could be supported! The obvious work-around is to pass a concrete array, although this can obviously be quite expensive, especially pre-jit.
System information
OS: Ubuntu 24.04
Flax, jax, jaxlib versions (obtain with `pip show flax jax jaxlib`)
Evaluating the shape of BatchNorm should simply return the input shape. Any model that is (partially) composed of BatchNorm should also not encounter this error.
Uh oh!
There was an error while loading. Please reload this page.
For very complex models, it is usually nice to initialize some feature dimensions automatically from output shape data.
nnx.eval_shape
facilitates this by allowing users to compute the output shape of model components without expensive FLOPs or memory allocation.Unfortunately, any model component that uses
BatchNorm
will not be able to be evaluated as such. See minimal example below.It would be nice if this could be supported! The obvious work-around is to pass a concrete array, although this can obviously be quite expensive, especially pre-jit.
System information
Flax, jax, jaxlib versions (obtain with `pip show flax jax jaxlib`)
Problem you have encountered:
See above.
What you expected to happen:
Evaluating the shape of
BatchNorm
should simply return the input shape. Any model that is (partially) composed of BatchNorm should also not encounter this error.Logs, error messages, etc:
Full traceback
Steps to reproduce:
Minimal example:
The text was updated successfully, but these errors were encountered: