Dm-haiku

Latest version: v0.0.12

Safety actively analyzes 613750 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.0.12

- `hk.LayerStack` transparency map now supports custom pytree leaves 9be7c9a9c6160c089b3d32f9384a41357f47d23c.
- `hk.LayerStack` now supports layers using state 134763d60a66b9246b1aaac67e5e63b4a4f4e0f5.
- Calling `repr(self)` in module constructors is now supported (fixing 428).

0.0.10

- Added `hk.mixed_precision.push_policy`.
- Added `hk.experimental.{get_params,get_initial_state,get_current_state}`.
- Added `hk.experimental.{maybe_get_rng_sequence_state,maybe_replace_rng_sequence_state}`.
- `hk.switch` now supports multiple operands.
- `hk.get_parameter` now supports `init=None`.
- `hk.MethodContext` now includes `orig_class`.
- `hk.GetterContext` now includes `lifted_prefix_name`.
- `hk.layer_stack` now allows parameter reuse.
- Haiku is now compatible with `jax.enable_custom_prng`.
- `TruncatedNormal` now exports lower and upper bounds.
- Haiku init/apply functions now return `dict` rather than `Mapping`.
- `hk.dropout` now supports `broadcast_dims`.

0.0.9

What's Changed
* Support vmap where in_axes is a list rather than a tuple in https://github.com/deepmind/dm-haiku/commit/307cf7dbda64d637ca423cacc9978f0ca19dc8a6
* Pass pmap axis specs optionally to make_model_info in https://github.com/deepmind/dm-haiku/commit/d0ba451c96a6ac4f44fb9457e252b1d675a5416a
* Remove use of jax_experimental_name_stack flag in https://github.com/deepmind/dm-haiku/commit/dbc0b1f2ffee9b348a3cb67460f28f9cc4667f08
* Add param_axis argument to RMSNorm to allow setting scale param shape in https://github.com/deepmind/dm-haiku/commit/a4998a02bc4e8303f9897e5c32ded90cc38fa84f
* Add documentation and error messages for w_init and w_init_scale to avoid confusion in https://github.com/deepmind/dm-haiku/pull/541
* Fix hk.while_loop carrying state when reserving variable sizes of rng keys. by copybara-service in https://github.com/deepmind/dm-haiku/pull/551
* Add ensemble example to hk.lift documentation. by copybara-service in https://github.com/deepmind/dm-haiku/pull/556

**Full Changelog**: https://github.com/deepmind/dm-haiku/compare/v0.0.8...v0.0.9

0.0.8

* Added [`experimental.force_name`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.experimental.force_name).
* Added ability to simulate a method name in [`experimental.name_scope`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.experimental.name_scope).
* Added a [config option](https://dm-haiku.readthedocs.io/en/latest/api.html?highlight=rng_reserve_size#module-haiku.config) for PRNG key block size.
* Added [`unroll`](https://dm-haiku.readthedocs.io/en/latest/api.html?highlight=unroll#haiku.dynamic_unroll) parameter to `dynamic_unroll`.
* Remove use of deprecated `jax.tree_*` functions.
* Many improvements to our examples.
* Improve error messages in [`vmap`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.vmap).
* Support `jax_experimental_name_stack` in jaxpr_info.
* [`transform_and_run`](https://dm-haiku.readthedocs.io/en/latest/api.html?highlight=map_rng#haiku.testing.transform_and_run) now supports a map on PRNG keys.
* `remat` now uses the new JAX remat implementation.
* Scale parameter is now optional in [`RMSNorm`](https://dm-haiku.readthedocs.io/en/latest/api.html?highlight=create_scale#haiku.RMSNorm).

0.0.7

- **Bug fix:** modules with leading zeros (e.g. `linear_007`) are now correctly handled. 7632affafad
- **Breaking change:** [`hk.vmap(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.vmap) now requires `split_rng` to be passed.
- **Breaking change:** `hk.jit` was removed from the public API.
- Feature: we always add profiler name scopes to Haiku modules with the latest version of JAX.
- Added a [tutorial on parameter sharing](https://github.com/deepmind/dm-haiku/blob/main/docs/notebooks/parameter_sharing.ipynb).
- Added [`hk.ModuleProtocol`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.ModuleProtocol) and [`hk.SupportsCall`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.SupportsCall).
- Added `cross_replica_axis` to [`VectorQuantiser`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.nets.VectorQuantizer).
- Added `allow_reuse` argument to [`hk.lift`](https://dm-haiku.readthedocs.io/en/latest/api.html#lift).
- Added `fan_in_axes` to [`VarianceScaling`](https://dm-haiku.readthedocs.io/en/latest/api.html#variancescaling) initialiser.
- Added [`hk.custom_setter(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#custom-setter) to intercept `hk.set_state(..)`.
- Added [`hk.Deferred`](https://dm-haiku.readthedocs.io/en/latest/api.html#deferred).
- Added [`hk.experimental.transparent_lift(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#transparent-lift) and [`hk.experimental.transparent_lift_with_state(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#transparent-lift-with-state).
- Added [`hk.experimental.fast_eval_shape(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#fast-eval-shape).
- Added [`hk.experimental.current_name()`](https://dm-haiku.readthedocs.io/en/latest/api.html#current-name).
- Added `hk.experimental.DO_NOT_STORE`. 2a6c03406f
- Added [config APIs](https://dm-haiku.readthedocs.io/en/latest/api.html#module-haiku.config).
- Added support for new `jax.named_call` implementation.
- The `HAIKU_FLATMAPPING` env var is no longer used.
- [`hk.dropout(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#haiku.dropout) now supports dynamic `rate`.
- [`hk.without_apply_rng(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#without-apply-rng) now supports multi transformed functions.

0.0.6

- Haiku now returns plain nested `dict`s rather than `FlatMap` from all APIs.
- [`hk.vmap(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#vmap) now optionally takes `split_rng`, this argument will be required in the next version of Haiku.
- [`hk.LayerNorm`](https://dm-haiku.readthedocs.io/en/latest/api.html#layernorm) now accepts `param_axis` in the constructor, this argument will be required in the next version of Haiku.
- [`hk.get_channel_index(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#get-channel-index) was added.
- [`hk.experimental.lift_with_state(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#lift-with-state) was added.
- [`hk.experimental.layer_stack(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#layer-stack) was added.
- [`hk.DepthwiseConv{1,3}D`](https://dm-haiku.readthedocs.io/en/latest/api.html?highlight=DepthwiseConv#convolutional) were added.
- [`hk.BatchNorm`](https://dm-haiku.readthedocs.io/en/latest/api.html#batchnorm) now supports sequences in `cross_replica_axis`.
- [`hk.experimental.check_jax_usage()`](https://dm-haiku.readthedocs.io/en/latest/api.html#check-jax-usage) makes Haiku check that JAX control flow/transforms are used correctly.
- [`hk.dynamic_unroll(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#dynamic-unroll) now supports `return_all_states`.
- [`hk.cond(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#cond) supports N operands.
- [`hk.experimental.module_auto_repr(False)`](https://dm-haiku.readthedocs.io/en/latest/api.html#module-auto-repr) can be used to speed up init.
- [`hk.data_structures.merge(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#merge) now supports `check_duplicates`.
- [`TruncatedNormal`](https://dm-haiku.readthedocs.io/en/latest/api.html#truncatednormal) initialiser now supports complex dtypes.
- `transform(jit(f))` now provides a nice error message.
- [`hk.multinomial(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#multinomial) now uses `jax.random.categorical`.
- Added [`hk.mixed_precision.{current,get}_policy(..)`](https://dm-haiku.readthedocs.io/en/latest/api.html#automatic-mixed-precision) for introspection.
- Mixed precision policies now support reloaded modules.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.