We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import os os.environ["JAX_ENABLE_X64"] = "1" import jax import haiku as hk import numpy as np @hk.transform def f(x): return hk.Linear(4)(x) f32_data = np.zeros((4, 8), dtype=np.float32) p = f.init(jax.random.PRNGKey(428), f32_data) print(jax.tree_map(lambda t: t.dtype, p)) f32_params = jax.tree_map(lambda t: t.astype(np.float32), p) print(f.apply(f32_params, f32_data).dtype)
Prints:
frozendict({ 'linear': frozendict({'b': dtype('float32'), 'w': dtype('float64')}), }) dtype('float32')
Hopefully the bfloat16 compatibility work means we get most of this for free and that we only need to port the initializers.
The text was updated successfully, but these errors were encountered:
64c1ef9
trevorcai
No branches or pull requests
Prints:
Hopefully the bfloat16 compatibility work means we get most of this for free and that we only need to port the initializers.
The text was updated successfully, but these errors were encountered: